atom/atom-keymap

Set different keyboard locale (not the system wide) in Atom on Windows 7

ajtb opened this issue · 5 comments

ajtb commented

Hi, I know keyboard localization is fixed, but from what I can understand, on Windows 7 Atom uses the system language to determine keyboard layout. I am using Windows 7 in English, but wit Polish (pl_PL) keyboard layout.

Atom does not recognize AltGr+z, which should produce "ż". I don't have this problem in other programs. Because of that, I'm wondering if it's possible to set a custom local keyboard layout in Atom? Or is there any kind of workaround I can use?

This is because AltGr-z is bound to editor:checkout-head-revision. We have started to remove AltGr keybindings from core starting with Atom 1.12 and will be continued in Atom 1.13, the keybind for editor:checkout-head-revision was removed in 1.13.0-beta4.

If you want to be able to write this character in Atom 1.12 using AltGr-z you will have to change the keybind yourself in your keymap.cson (File menu -> Keymap...) and add the following:

'atom-workspace atom-text-editor:not([mini])':
  'ctrl-alt-z': 'unset!'

Sorry for the inconvenience.

ajtb commented

Great, thanks for your help!

ajtb commented

One last thing: this does not seem to work for AltGr+O.
'ctrl-alt-o': 'unset!' does nothing, unfortunately. I guess I'll try the beta for now.

I believe you need to use a different selector for AltGr+o. You can try this:

'body':
  'ctrl-alt-o': 'unset!'

In the beta this is changed to Ctrl-Shift-O to avoid conflict with the AltGr variants.

ajtb commented

I get an error, "failed to load keymap"

[stdin]:53:10: error: unexpected newline
  'body':
         ^

I had it for the first solution, but changed it to ".platform-win32 atom-text-editor:not([mini])":
This helped, for "z", but does nothing for "o".
The solution is right around the corner, so I guess I'll wait or use beta. Thanks again for the tip :)