Powertoys: Keyboard Manager in RDP and some other programs

Created on 4 Jul 2020  路  9Comments  路  Source: microsoft/PowerToys

Environment

Windows build number: Microsoft Windows [Version 10.0.19042.330]
PowerToys version: 0.18.2
PowerToy module for which you are reporting the bug (if applicable): Keyboard Manager

Steps to reproduce

Remapped keys:
PgUp - End
End - PgDn
PgDn - PgUp

Expected behavior

It will work in any program.

Actual behavior

It works only in a simple programs as notepad and not work in Notepad++ and in remote sessions (RDP)

Issue-Bug Product-Keyboard Shortcut Manager

All 9 comments

Updated to 0.19.0
Locally works in all apps.
Not work only in RDP.

0.19.0
Found a pattern for bug for local apps.
If notepad started with admin rights - remap didnot work.

@arjunbalgovind

0.19.0
Found a pattern for bug for local apps.
If notepad started with admin rights - remap didnot work.

@7OH this can be resolved by running PowerToys as admin (by using the Restart as admin option under PowerToys Settings). This is required as Keyboard Manager cannot remap keystrokes sent to an app running with admin rights unless Keyboard Manager has the same rights.

For making it work with RDP, after you connect to the Remote Desktop system, open the PowerToys settings on your local machine and disable and re-enable Keyboard Manager. This is required because Remote Desktop creates its on keyboard hook which suppresses any tools that process keyboard events using keyboard hooks. More information at this previous issue on the same topic https://github.com/microsoft/PowerToys/issues/3614#issuecomment-636174651

if it can be runned on sturtup without confirmation with UAC - will be a solution.

Manual restart of an app is not good idea - user can forgot to do it on every boot.

will try with RDP. but may be solution for hook creating RDP window and reenable in automode.

changing keyboard from registry works at least without looking admin or not admin. Were think that this tools works same.

I'm on v0.21.1 and am still experiencing an issue I believe is related.

My local PC is running PowerToys Keyboard Manager with a certain set of remappings, and my remote PC is running the exact same configuration of PowerToys and Keyboard Manager. When I RDP into the remote PC, the remapping works without meaningful issue. However, if I return to using my local PC, PowerToys will have already silently crashed. If I disable Keyboard Manager on my local PC prior to using the RDP window, PowerToys continues running just fine.

It seems like the keyboard hooks are definitely in conflict, because PowerToys will continue to silently crash as I go back and forth between my local PC and my RDP session, regardless of whether I disable and re-enable Keyboard Manager locally.

If I disable Keyboard Manager on the remote PC and try using it only on my local PC, it still silently crashes the moment I try using one of the remapped keys.

@Petrosophia can you share your event viewer logs when the crash occurs? We haven't observed a crash occur in such a scenario before.

@arjunbalgovind Is this what you're looking for? It happens literally every single time as soon as I press one of my remapped keys in my RDP session, so it's trivial for me to reproduce.

Faulting application name: PowerToys.exe, version: 0.21.1.0, time stamp: 0x5f4fd7b2
Faulting module name: KeyboardManager.dll, version: 0.21.1.0, time stamp: 0x5f4fd772
Exception code: 0xc0000409
Fault offset: 0x000000000007f9a1
Faulting process id: 0x34dc
Faulting application start time: 0x01d691194f2c063e
Faulting application path: C:\Program Files\PowerToys\PowerToys.exe
Faulting module path: C:\Program Files\PowerToys\modules\KeyboardManager\KeyboardManager.dll
Report Id: 110e0285-7294-4313-af0b-74ae69edee04
Faulting package full name: 
Faulting package-relative application ID: 

@Petrosophia can you create a separate issue for this with information you provided in the two comments? This issue was only to track KBM not working on remote machines but not for a crash.

Was this page helpful?
0 / 5 - 0 ratings