Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut Remaps can stop working on using Alt+` in Japanese IME #6951

Closed
arjunbalgovind opened this issue Oct 1, 2020 · 9 comments
Closed
Assignees
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Keyboard Shortcut Manager Issues regarding Keyboard Shortcut Manager Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@arjunbalgovind
Copy link
Contributor

Unfortunately, it didn't work in my case with v0.23.

@arjunbalgovind
Could you take a look at my case, please? I'm using Alt+` for IME switching. Corresponding virtual key code is VK_KANJI(0x19).

Originally posted by @tsu1980 in #5225 (comment)

ℹ Computer information

  • PowerToys version: 0.23
  • PowerToy Utility:
  • Running PowerToys as Admin:
  • Windows build number: [run "winver"]

📝 Provide detailed reproduction steps (if any)

  1. Switch to Japanese keyboard
  2. Press Alt+` a couple of times

✔️ Expected result

What is the expected result of the above steps?
Remaps should be unaffected

❌ Actual result

What is the actual result of the above steps?
Shortcut to shortcut remaps stop working

@arjunbalgovind arjunbalgovind added Issue-Bug Something isn't working Product-Keyboard Shortcut Manager Issues regarding Keyboard Shortcut Manager labels Oct 1, 2020
@arjunbalgovind arjunbalgovind added this to the InVEST-2010 milestone Oct 1, 2020
@arjunbalgovind arjunbalgovind added Status-In progress This issue or work-item is under development Hot Fix Items we will product an out-of-band release for Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Oct 1, 2020
@arjunbalgovind arjunbalgovind self-assigned this Oct 1, 2020
@crutkas
Copy link
Member

crutkas commented Oct 9, 2020

@crutkas crutkas closed this as completed Oct 9, 2020
@tsu1980
Copy link

tsu1980 commented Oct 10, 2020

Unfortunately, it didn't work with v0.23.2 either.

I looked at #6952 and it looks like 0x19 is not excluded.
Does that mean It doesn't need to exclude 0x19?

@arjunbalgovind
Copy link
Contributor Author

@tsu1980 0x19 is not a reserved key code, on switching to Kanji IME that key code gets pressed and released, so it should not cause any issues to the shortcut remaps. Can you share some more information about your exact repo scenario? I'm able to use Alt+` to switch IME and then I can use shortcut remaps like Ctrl+A->Ctrl+V. Can you send a screenshot of your set of remappings?

@tsu1980
Copy link

tsu1980 commented Oct 10, 2020

@arjunbalgovind
Let me explain my situation in detail.

First of all, I'm using a US keyboard and Google IME.

My KBM configuration screen is as follows.

KBM

I checked in the KeyboardStateView and found the following keycodes.

  1. press ALT(0x12, 0xa4)
  2. press the Kanji(`) key(0x19, 0xf2, 0xf4, 0xf0, 0xf3)
    When I press and hold down the Kanji(`), 0x19 will remain in the pressed state, while 0xf2, 0xf4 and 0xf0, 0xf3 will repeat the pressed and unpressed states with each other.
    Kanji(`) key is located above the TAB key.

KSV

@arjunbalgovind
Copy link
Contributor Author

Thanks for the details @tsu1980, I am able to reproduce the issue, but it doesn't happen always. Sometimes pressing Alt+` again resets it back correctly (which is different from the others 0xF0-0xF4 because some of them never get toggled back).

@crutkas @ryanbodrug-microsoft I am not entirely sure what's the fix for this. An option is to just add all the IME keys to the "ignore list" when we search for keys that are being pressed when a shortcut is pressed, and that will fix this issue, but I don't know if it's the right thing to do. This behavior of VK_KANJI getting stuck feels like a Windows bug rather than something that you would workaround. It made sense to ignore the reserved keys, but keys which have a proper key code seems odd. The workaround is easy to do though, so if you think I should go ahead with that I can do it.

@arjunbalgovind
Copy link
Contributor Author

arjunbalgovind commented Oct 19, 2020

@tsu1980 The exact scenario which seems to cause the behavior is:

  • Press Alt
  • Press `
  • Release Alt
  • Release `

(Generally we would release ` before Alt, which is why this scenario doesnt repro every time we press Alt+`)

@tsu1980
Copy link

tsu1980 commented Oct 20, 2020

@arjunbalgovind
Thank you for your help.
I wasn't aware of the order in which those keys were pressed, but you may have been right.

@arjunbalgovind
Copy link
Contributor Author

@tsu1980 I have added a fix for it, and it should work for you in the next release

@tsu1980
Copy link

tsu1980 commented Oct 30, 2020

@arjunbalgovind
I was able to confirm that it works properly now with v0.25.0. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hot Fix Items we will product an out-of-band release for Issue-Bug Something isn't working Product-Keyboard Shortcut Manager Issues regarding Keyboard Shortcut Manager Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

3 participants