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

[Windows] Distinguish between RAlt and LAlt for shortcuts in Keyman #364

Closed
andjc opened this issue Oct 17, 2017 · 5 comments · Fixed by #2360
Closed

[Windows] Distinguish between RAlt and LAlt for shortcuts in Keyman #364

andjc opened this issue Oct 17, 2017 · 5 comments · Fixed by #2360
Labels
Milestone

Comments

@andjc
Copy link

andjc commented Oct 17, 2017

Distinguish between RAlt and LAlt for shortcuts in Keyman (Windows) and assign shortcuts to SHIFT + LALT sequences, making available SHIFT + RALT key sequences available for keyboard rules.

@darcywong00
Copy link
Contributor

Good news. Parts of this request are already in-work as #340 and available in the 10.0 alphas

@mcdurdin mcdurdin added this to the Future milestone Apr 24, 2018
@mcdurdin mcdurdin modified the milestone: Future Jun 29, 2018
@mcdurdin mcdurdin added this to the 11.0 milestone Oct 23, 2018
@mcdurdin mcdurdin modified the milestones: 11.0, Future Dec 10, 2018
@mcdurdin
Copy link
Member

Good news. Parts of this request are already in-work as #340 and available in the 10.0 alphas

This is actually incorrect -- wrong platform!

However, this is an important issue. See also #1044.

@mcdurdin
Copy link
Member

From #1044, @mcdurdin wrote:

Because Right Alt is the most commonly used extended modifier in keyboard layouts, the Keyman default hotkeys such as Alt+Shift+O to turn Keyman off can conflict with some keyboards. If Keyman responded to hotkeys only with Left Alt+Shift+O, then Right Alt could be used by keyboard layouts without trouble.

See discussion at keymanapp/keyboards#362 (comment)

@mcdurdin
Copy link
Member

This is a little more challenging than I'd prefer. Currently we use RegisterHotkey to register a hotkey. Amazing that. However, RegisterHotkey does not distinguish between left and right modifiers.

This means we'd need to re-implement hotkeys in the low level keyboard hook, which raises the risk of this feature change considerably.

@mcdurdin mcdurdin modified the milestones: Future, P8S4 Nov 8, 2019
mcdurdin added a commit that referenced this issue Nov 19, 2019
Fixes #364.

Hotkeys in Windows are currently implemented using RegisterHotkey.
However RegisterHotkey does not distinguish between left and right
modifier keys, which means that they override some keyboards' RAlt
combinations.

This feature reimplements hotkey support in the low level keyboard hook,
and adds a feature flag / debug flag Flag_UseRegisterHotkey to return
to the RegisterHotkey model if that is so needed.

I have made minimal refactoring changes to this code, although there
are certainly functions here which could be improved.

I have flagged a couple of potential improvements with TODO.
@mcdurdin mcdurdin changed the title Distinguish between RAlt and LAlt for shortcuts in Keyman (Windows) [Windows] Distinguish between RAlt and LAlt for shortcuts in Keyman Nov 19, 2019
@mcdurdin
Copy link
Member

Finally, a fix is on its way in #2360!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants