microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
108.41k stars 6.41k forks source link

[KBM] The remapped keys will randomly stopped working #7348

Closed gnomeria closed 3 years ago

gnomeria commented 3 years ago

ℹ Computer information

📝 Provide detailed reproduction steps (if any)

I use Colemak-DH keyboard layout.

✔️ Expected result

PowerToy settings window is showing just fine, and all toggles are set to be enabled.

❌ Actual result

The keyboard remap shortcuts util was working fine for random amount of time. When it stopped working, it needs the windows to be reboot before it's working again.

Sometimes it's working through more than two days with multiple sleep/hibernate state. But also sometimes, it's stopped working on a freshly booted system in 15-30 minutes. The powertoy and launcher process is showing in task manager no problem.

It has no errors in the windows event viewer

📷 Screenshots

image image

ghost commented 3 years ago

@gnormeria Is this happening when you use certain apps or is it really random?

arjunbalgovind commented 3 years ago

@gnomeria does this happen only for the shortcut remaps? This sounds a bit similar in behavior to #5225. Is there some software that you are using for the Colemak-DH layout or is that the physical layout of your keyboard? If it's software can you share the link to it so that we can try reproducing the issue? For shortcut remaps we have logic that checks if any other keys are pressed, so I suspect some key code is getting set for Colemak-DH layouts which doesn't get released until reboot (the same was happening for Japanese keyboard layout in #5225)

gnomeria commented 3 years ago

@arjunbalgovind yes it seems to be quite similar to the Japanese IME. And it's quite random, it's in windows terminal, browser, or vscode when it stopped working and messing my shortcuts.

I use KLC file with an installer in this repo https://github.com/ColemakMods/mod-dh/tree/master/klc , which then I set it in the settings folder image

For the exact key combination, I probably haven't noticed it enough, that it just seems random.

arjunbalgovind commented 3 years ago

@gnomeria when your system enters this state where shortcut remaps stop working, can you check if Shortcut Guide works? The Japanese IME issue had affected both of them, so if Shortcut Guide fails as well then we know for sure that it's a similar cause.

gnomeria commented 3 years ago

Oh, it was working fine for the Shortcut Guide when I hold the Windows button. But I might've to reconfirm it again since now I'm turning off the guide.

gnomeria commented 3 years ago

I just now have the issue again. It seems the Shortcut Guide no longer works if it's in this state. @arjunbalgovind

captwnder commented 3 years ago

I'm having this same issue. It seems to have started randomly (I can't identify a cause).

When I go into the shortcut mapping screen and try to map a new key, it arbitrarily shows my "WIN (left)" key as "CTRL (left)". To clarify, As I'm creating a shortcut, I type "WIN + S" and in the mapping screen it will sometimes show "WIN (left)" and sometimes show "CTRL (left)" even though I'm hitting the same key combination every time. If I hit the Windows key only, it consistently shows "WIN (left)" in the mapping.

I've also tried exiting Power Toys and opening it again but that didn't resolve the issue

enricogior commented 3 years ago

@gnomeria do you still have this problem with 0.37? https://github.com/microsoft/PowerToys/releases/download/v0.37.0/PowerToysSetup-0.37.0-x64.exe

captwnder commented 3 years ago

@gnomeria do you still have this problem with 0.37? https://github.com/microsoft/PowerToys/releases/download/v0.37.0/PowerToysSetup-0.37.0-x64.exe

I actually ended up rebooting which resolved the issue and I haven't had it happen again. I'm installing 0.37 now and will see if it happens again.

bryonrye commented 3 years ago

I can re-create the problem consistently on my Dell XPS 15 9570 running Windows 10 (version 20H2, OS build 19042.928, Experience Pack 120.2212.551.0) and PowerKeys 0.37. Here are the steps:

Setup:

  1. Map shortcut Ctrl E -> Ctrl N -> All Apps

I use that one to open a new Explorer window.

Use:

  1. Kill PowerToys Runner process through Process Manager.
  2. Restart PowerKeys, running as admin with "Always run as administrator" turned "On."
  3. Acknowledge the dialog asking if I want to allow PowerToys to make changes to this device.
  4. Test the key combination. If it already isn't already stalled at this point,
  5. Navigate to typingtest.com and take a one-minute typing test.
  6. Try the Ctrl E combination. No worky.

Other key combinations like my Ctrl Q -> Backspace -> All Apps continue working in Notepad++, but that Ctrl E one does not work after I click on the desktop (to set focus).

ghost commented 3 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

Jerryzhuht commented 2 years ago

I'm having this same issue. It seems to have started randomly (I can't identify a cause).

When I go into the shortcut mapping screen and try to map a new key, it arbitrarily shows my "WIN (left)" key as "CTRL (left)". To clarify, As I'm creating a shortcut, I type "WIN + S" and in the mapping screen it will sometimes show "WIN (left)" and sometimes show "CTRL (left)" even though I'm hitting the same key combination every time. If I hit the Windows key only, it consistently shows "WIN (left)" in the mapping.

I've also tried exiting Power Toys and opening it again but that didn't resolve the issue

I have been experiencing the same issue using the latest released version as of today.

SebastianBitsch commented 2 years ago

I've had the same issue in v0.57.2 - rebooting the computer seems to fix it for me.

GhostM121 commented 1 year ago

Just started using power toys, also having the same issue until I reboot.

GhostM121 commented 1 year ago

Seems to stop working whenever my pc goes to sleep.

dreanmer commented 1 year ago

Seems to stop working whenever my pc goes to sleep.

Are you using multiple keyboard layout? In my case it seems the problem, whenever my pc lock/sleep it reset the keyboard layout to the default one and the shortcuts stops working. I'll try to reproduce it consistently and came back to report. Also reboot fix it temporary

mlzxy commented 1 year ago

Having the same problem. It seems hibernation is the trigger. Note that keys mapping seems to be stable, only the shortcut mapping flips sometimes. It also depends on what shortcut, for example, I map Ctrl-Tab to Alt-Tab, and this mapping breaks frequently after hibernation.

Keyboard remapping is quite important for me to maintain the same set of shortcuts across a Mac and PC. I use two keyboard layouts.

mlzxy commented 1 year ago

Having the same problem. It seems hibernation is the trigger. Note that keys mapping seems to be stable, only the shortcut mapping flips sometimes. It also depends on what shortcut, for example, I map Ctrl-Tab to Alt-Tab, and this mapping breaks frequently after hibernation.

Keyboard remapping is quite important for me to maintain the same set of shortcuts across a Mac and PC. I use two keyboard layouts.

Found a temporary solution (at least for me), lock and unlock

https://github.com/microsoft/PowerToys/issues/27757

akaihola commented 10 months ago

Found a temporary solution (at least for me), lock and unlock

27757

Same here. I'm on Windows 11 Enterprise 22H2 22621.2428 (Windows Feature Experience Pack 1000.22674.1000.0).

I use multiple keyboard layouts, one of which has been created by myself using Microsoft Keyboard Layout Creator 1.4.

I've also switched my Lenovo laptop Ctrl and Fn keys in the BIOS setup, and also CapsLock and Ctrl (using a registry hack IIRC).

With PowerToys, I've remapped several of the default Win key combinations, and added Win+Shift ones as well. These ones sometimes stop working after opening the laptop from sleep.

Apart from rebooting, the lock-unlock trick is the only other way I've found to make the remappings work again.

junepy commented 5 months ago

Having the same problem. It seems hibernation is the trigger. Note that keys mapping seems to be stable, only the shortcut mapping flips sometimes. It also depends on what shortcut, for example, I map Ctrl-Tab to Alt-Tab, and this mapping breaks frequently after hibernation. Keyboard remapping is quite important for me to maintain the same set of shortcuts across a Mac and PC. I use two keyboard layouts.

Found a temporary solution (at least for me), lock and unlock

27757

Still have such issue from latest v0.78.0, but lock and unlock does work as a workaround.

hamen commented 2 months ago

Hi all

I know this is closed, but now I know when this happens: every time I access 1password with the Windows PIN, my Alt+1 and Alt+2 shortcuts stop working.

At that point, I need to press Win+L to lock the screen, login again and the shortcuts work again.