Mouse jiggler not working for me.

Mouse jiggler not working for me.

avatar

I'm running v2026.1.14.0 on Windows 11 23H2 and I'm unable to get the mouse jiggler to work when using RDP to Windows 2016 through Windows 2025 server. I've tried the steps I see in the other threads regarding troubleshooting this issue but none of them helped. I enabled trace logging for API hooking. May I send that log for diagnosis?

All Comments (11)

avatar

Hello

Sorry to hear that's not working right for you. You could send me the log by PM (you may need to .zip it first as I don't think text files could be attached to a PM). That would be the most direct way for me to look at it; but if you prefer you can also email service@devolutions.net and mention this forum thread.

Thanks and kind regards,

Richard Markievicz

avatar

Hello again

One more thing - it would also be really helpful to know the precise Windows version on the system that runs RDM, including the build number., The easiest way to that information is to Start > Run and enter "winver".

Thanks again,

Richard Markievicz

avatar

Ther build is 22631.6783.

avatar

Hello

Ok, so the log shows the setting is there. It's not a configuration issues or a general issue with enabling API hooking.

I do suspect there is something specific about this Windows version, although I haven't been able to confirm that. It works for me on 25H2 and I haven't had any other recent reports. But there is some overhead in directly evaluating your specific Windows version for breakage (it's not unknown that Microsoft changes things on their side, but only in specific builds).

I'd like to confirm if the "jiggles" are actually reaching the sever or not.

The way I evaluate this on my side is to configure the Jiggler in function key mode, and set a low interval (say, 5 seconds). Then on the server run KeyboardStateView (standalone executable, no installation or special rights needed) and monitor it to see if the function key F15 is indeed getting pressed. I attached a screen recording showing that.

Please try it and let me know the result

Kind regards,

Richard Markievicz

Screen Recording 2026-04-10 at 11.04.18.mov

avatar

We are a very 'locked down' environment here so getting access to shareware/freeware might be challenging. But I will see what I can do.

avatar

Hello

That would've been convenient, but here is a PowerShell script that achieves the same effect. Does that help?

Add-Type -TypeDefinition @"
  using System;
  using System.Diagnostics;
  using System.Runtime.InteropServices;
  using System.Threading;

  public class LowLevelKeyboardHook {
      private const int WH_KEYBOARD_LL = 13;
      private const int WM_KEYDOWN = 0x0100;
      private const int VK_F15 = 0x7E;

      private delegate IntPtr HookProc(int nCode, IntPtr wParam, IntPtr lParam);
      private static HookProc _proc = HookCallback;
      private static IntPtr _hookId = IntPtr.Zero;
      private static int _threadId;

      [DllImport("user32.dll", SetLastError = true)]
      private static extern IntPtr SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hMod, uint dwThreadId);

      [DllImport("user32.dll", SetLastError = true)]
      [return: MarshalAs(UnmanagedType.Bool)]
      private static extern bool UnhookWindowsHookEx(IntPtr hhk);

      [DllImport("user32.dll")]
      private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);

      [DllImport("kernel32.dll", SetLastError = true)]
      private static extern IntPtr GetModuleHandle(string lpModuleName);

      [DllImport("user32.dll")]
      private static extern bool GetMessage(out MSG lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax);

      [DllImport("user32.dll")]
      private static extern bool TranslateMessage(ref MSG lpMsg);

      [DllImport("user32.dll")]
      private static extern IntPtr DispatchMessage(ref MSG lpMsg);

      [DllImport("user32.dll")]
      private static extern bool PostThreadMessage(int idThread, uint Msg, IntPtr wParam, IntPtr lParam);

      [DllImport("kernel32.dll")]
      private static extern int GetCurrentThreadId();

      private const uint WM_QUIT = 0x0012;

      [StructLayout(LayoutKind.Sequential)]
      private struct MSG {
          public IntPtr hwnd;
          public uint message;
          public IntPtr wParam;
          public IntPtr lParam;
          public uint time;
          public POINT pt;
      }

      [StructLayout(LayoutKind.Sequential)]
      private struct POINT {
          public int x;
          public int y;
      }

      private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) {
          if (nCode >= 0 && (int)wParam == WM_KEYDOWN) {
              int vkCode = Marshal.ReadInt32(lParam);
              if (vkCode == VK_F15) {
                  Console.WriteLine("[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "] F15 pressed!");
              }
          }
          return CallNextHookEx(_hookId, nCode, wParam, lParam);
      }

      public static void Start() {
          _threadId = GetCurrentThreadId();

          Console.CancelKeyPress += (sender, e) => {
              e.Cancel = true;
              Console.WriteLine("Stopping...");
              PostThreadMessage(_threadId, WM_QUIT, IntPtr.Zero, IntPtr.Zero);
          };

          using (var curProcess = Process.GetCurrentProcess())
          using (var curModule = curProcess.MainModule) {
              _hookId = SetWindowsHookEx(WH_KEYBOARD_LL, _proc, GetModuleHandle(curModule.ModuleName), 0);
          }

          if (_hookId == IntPtr.Zero) {
              Console.WriteLine("Failed to install hook. Error: " + Marshal.GetLastWin32Error());
              return;
          }

          Console.WriteLine("Monitoring for F15 key press via low-level hook... (Ctrl+C to stop)");

          MSG msg;
          while (GetMessage(out msg, IntPtr.Zero, 0, 0)) {
              TranslateMessage(ref msg);
              DispatchMessage(ref msg);
          }

          UnhookWindowsHookEx(_hookId);
          Console.WriteLine("Hook removed. Done.");
      }
  }
  "@

  [LowLevelKeyboardHook]::Start()


Kind regards,

Richard Markievicz

avatar

Yes, very helpful. The output is below. It appears to be working.

Monitoring for F15 key press via low-level hook... (Ctrl+C to stop)
[2026-04-10 14:12:07.613] F15 pressed!
[2026-04-10 14:12:12.609] F15 pressed!
[2026-04-10 14:12:17.612] F15 pressed!
[2026-04-10 14:12:22.610] F15 pressed!
[2026-04-10 14:12:27.604] F15 pressed!
[2026-04-10 14:12:32.613] F15 pressed!
[2026-04-10 14:12:37.610] F15 pressed!
[2026-04-10 14:12:42.603] F15 pressed!
[2026-04-10 14:12:47.604] F15 pressed!
[2026-04-10 14:12:52.610] F15 pressed!
[2026-04-10 14:12:57.604] F15 pressed!
[2026-04-10 14:13:02.600] F15 pressed!
[2026-04-10 14:13:07.604] F15 pressed!
[2026-04-10 14:13:12.607] F15 pressed!
[2026-04-10 14:13:17.607] F15 pressed!
[2026-04-10 14:13:22.607] F15 pressed!
[2026-04-10 14:13:27.610] F15 pressed!
[2026-04-10 14:13:32.608] F15 pressed!
[2026-04-10 14:13:37.610] F15 pressed!
[2026-04-10 14:13:42.606] F15 pressed!
[2026-04-10 14:13:47.610] F15 pressed!
[2026-04-10 14:13:52.598] F15 pressed!
[2026-04-10 14:13:57.608] F15 pressed!
[2026-04-10 14:14:02.609] F15 pressed!
[2026-04-10 14:14:07.609] F15 pressed!
Stopping...
Hook removed. Done.

avatar

Hello

Yes, it does appear to be working. In the OP you wrote "unable to get the mouse jiggler to work" - what's the actual issue? The server is locking after some inactivity and you don't want it to?

Kind regards,

Richard Markievicz

avatar

Hello again

Just to follow up: is this something that used to work? It really doesn't seem like a problem on our side. I wonder if the servers in this case are configured to lock after a specific time period, regardless of user interaction. Let me know.

Thanks and kind regards,

Richard Markievicz

avatar

There are inactivity timers set on the servers but that is 15 minutes. I was expecting that the mouse jiggler would prevent that inactivity timer from expiring.

avatar

Hello

We've not got a good way to check if mouse "jiggles" are being sent in your environment, but since the function key (F15) approach is clearly working I see no reason the mouse moves wouldn't be. I say that because there's always a chance Microsoft is no longer considering F15 as something to keep the server from going idle - but, even if they were, it wouldn't explain why you get the same results on older systems (you wrote Win2k16 in your original post).

Indeed this feature is explicitly there to prevent an inactivity timer from tripping. But since it does look correct on the RDM side, I'm a bit lost as to why the servers would still lock.

You said the environment is very locked down, it might be worth investigating exactly what that means and if something else is interacting here on the server side...

I'm sorry I don't have a better answer right now.

Kind regards,

Richard Markievicz