As we continue to design and build exciting new features, we’re also taking the time to pull back the curtain on some of the most important enhancements that will help significantly improve your remote support experience. Another recent addition is the ability to lock the remote mouse and keyboard for the duration of your connection.
Why is it useful?
SetMe is designed in a way that both you and the remote party can use the remote mouse and keyboard. It puts you as the one in charge of controlling the remote mouse and allows you to temporarily disable the remote user’s input capabilities if deemed necessary.
To minimize the effect of user interference when both parties start using the remote mouse, our app offers a built-in mechanism that gives you priority control over simultaneous mouse movements. This way you can conveniently work on the remote desktop without having to fight the remote user over the cursor. In case they need to regain control, you can always give it back by simply releasing the remote mouse.
Controlling the remote keyboard is a totally different story. The remote user may start pressing keyboard keys at the worst possible moment, specifically when you are in the middle of an important task, and thus interfere with your work. In another scenario, the remote user might close the connection as soon as they regain control of the remote mouse. In both cases, you may want to completely prevent the remote user from using their input devices, and that’s exactly what the new feature is for.
How does it work?
You can lock the remote keyboard and mouse at any time during a remote connection. SetMe disables both hardware and software input at the remote end, which means that the remote user will temporarily lose control of their mouse and keyboard even if they’re working in an RDP session or another remote desktop application.
You can use this feature when/if needed by clicking the corresponding icon in the remote desktop toolbar. You can also automatically disable remote input for all your future connections. In this case, you will still be able to re-enable and disable input individually for each connection using the remote desktop toolbar.
From a security standpoint, fully disabling remote input without leaving any option of getting it back would be incorrect. We took that into consideration and built the new feature so that the remote user can regain access to their mouse and keyboard using the Ctrl-Alt-Del key combination on Windows or Option(Alt)-Command-Esc on macOS.
Remote input will be unlocked after the remote desktop connection is closed. It will also be unlocked if the application is unable to capture the remote screen. That said, the remote user will regain control of their mouse and keyboard:
- If you close the remote desktop window.
- If network connection is lost or interrupted on either end.
The new lock remote keyboard & mouse feature is now available and we welcome you to try it:
Digging deeper into the mechanics
Developing such functionality is a challenging task that requires solid understanding of how operating systems and low-level system features work. Fortunately, our developers have the necessary knowledge and expertise in this area. Furthermore, our long-standing experience with FixMe.IT, which already has a mechanism that can also be used for the purpose of disabling remote input, allowed us to come up with the best possible solution.
Both Microsoft Windows and macOS provide an opportunity to monitor and intercept various events that occur within the operating system. In Microsoft Windows, there are hooks. macOS offers event taps that provide functionality similar to the Win32 functions SetWinEventHook used to establish an out-of-context event hook, and SendInput. SetMe uses hooks and event taps to block user input at the remote end.
Below you’ll see a schematic overview of how the blocking mechanism works:
Digging deeper into the mechanics, here’s how it is designed:
Microsoft Windows
- Using the SetWindowsHookEx function, one of the application’s components installs a hook procedure for the following events:
WH_MOUSE_LL to monitor low-level mouse and touchpad input events.
WH_KEYBOARD_LL to monitor low-level keyboard input events.
Low-level hooks allow SetMe to monitor and intercept these events before they are added to the application’s input queue. - After installing the hook procedure, our application captures all input events regardless of their source.
- The application checks the dwExtraInfo field value within the lParam parameter in order to identify what messages to forward up the chain.
LowLevelMouseProc function
LowLevelKeyboardProc function
In most cases, if a message originates from a source other than SetMe, the value of dwExtraInfo is set to 0. - Another application component is responsible for managing the remote keyboard and mouse. This component calls the SendInput system function which then receives the parameter with dwExtraInfo. Here we insert a special numerical value used to identify the source of an event.
- Therefore, all input events generated by SetMe have a special identifier which allows the app to filter out any external events from the input stream.
macOS
- To disable the remote user’s input capabilities, we install a hook procedure to monitor keyboard and mouse events. After installing the procedure using the CGEventTapCreate function, our application captures all input events regardless of their source.
- Using the CGEventSourceSetUserData function, we add a special numeric value to the kCGEventSourceUserData field of each event, which is then forwarded to the operating system. Therefore, every mouse and keyboard event generated by SetMe is marked with our special number.
- To enable remote control capabilities, SetMe creates the following events in the remote computer’s operating system:
CGEventCreateMouseEvent: generates a new mouse event.
CGEventCreateKeyboardEvent: generates a new keyboard event. - In order to identify which events to forward up the chain and which events to block, the application receives kCGEventSourceUserData using the CGEventGetIntegerValueField function.
- Any event originating from a source other than SetMe contains a value that’s different from our special number and is ultimately blocked by the application.
It is relevant to note that Windows offers an alternative way to filter out external input events. Along with dwExtraInfo, the hook function receives flags which allow it to identify whether a specific event has been generated by a physical mouse and keyboard or injected into the system by the SendInput function. In this case, the LLMHF_INJECTED value (0x00000001) will show that the input event has been injected. However, this approach does not allow disabling input from third-party applications. As an example, if SetMe’s Client application was running in an RDP session, then RDP would be the source of any input events. By contrast, our solution of choice allows SetMe to entirely block any third-party input events.
When passing this feature through quality assurance, we have tested dozens of mouse and keyboard types from different manufacturers, with some of them using their own software to perform various functions. On top of that, we have also tested several gamepads and touchscreens to make sure that all input devices can be fully disabled and the new feature runs like clockwork.
We’re constantly improving SetMe to provide you with a feature-rich and reliable solution that ticks all the boxes. More awesome new features are currently in the works, so stay tuned for upcoming updates!