Resolve numpad differently to avoid conflict with Windows unicode entry#198
Resolve numpad differently to avoid conflict with Windows unicode entry#198
Conversation
bd9c9d1 to
65093a7
Compare
|
I think alt-numpad is a Windows-only thing. |
|
I see this but may not have time to get to it this week. Adding it to my list. |
nathansobo
left a comment
There was a problem hiding this comment.
👍 Nice work. Sorry for the delay in reviewing. Feel free to merge, publish, and upgrade on the master branch of atom/atom.
|
I have no idea how to publish 😆 |
|
|
Here’s a Linux guy that got bitten by this :) https://discuss.atom.io/t/1-16-handles-numpad-differently-compared-to-1-15/42681 In short, I’ve remapped the numpad keys to other keys, but since atom now uses Here’s my workaround: lydell/dotfiles@c871a37 It might also be worth looking into why this wasn’t mentioned in the 1.16 changelog. Not sure if this PR should only be applied to Windows only or if I’m this guy: https://xkcd.com/1172/ |
Description of the Change
Windows uses Alt-numpad to insert unicode characters.
atom-keymapcurrently resolves the numpad digits the same was as the numeric row which means that unicode entry will conflict with Alt-number bound keys. Alt-number is bound topane-show-item-[number]which means you can't use Alt-numpad to enter unicode characters in Atom without changing pane items.This changes the numpad digits to resolve to
numpad[number]instead of just[number]by usingKeyboardEvent.codewhen numlock is on to avoid conflict. Windows seems to still allow unicode entry when numlock is off which would conflict with keybindings but this seems to be the expected behavior on Windows after testing it in some common programs.Alternate Designs
Benefits
Fixes #147 and allows us to enter unicode characters with the numpad on Windows without conflicting with Atoms default set of keybindings.
Possible Drawbacks
Applicable Issues
Fixes #147