atom/atom-keymap

Cannot write '[', ']', '{', '}' with cs_CZ-qwerty keyboard layout

Closed this issue · 17 comments

jizi commented

Hi,

after upgrading to Atom v1.12.0 and suggested unistalling the keyboard-localization package I am not able to write '[', ']', '{', '}' with cs_CZ-qwerty keyboard layout (https://www.terena.org/activities/multiling/ml-mua/test/img/kbd_czech.gif) in Windows.
In other editors Alt+ú, Alt+), Alt+Shift+/ and Alt+Shift+( works as above mentioned characters.

With previous version of Atom and keyboard-localization (1.14.18) it was working correctly.

Could you please check this? Thanks in advance.

/cc: @nathansobo AltGraph-9 for example resolves to ] but written key is dead ´.

cs_cz

@Ben3eeE So is this a bug in Chrome or something inputting the wrong character?

@ungb This is one issue where I could use your help figuring out what's going on.

Just realized that I was using cs_CZ-qwertz when recording that gif and not cs_CZ-qwerty as the issue states. I can not reproduce this with cs_CZ-qwerty.

I can reproduce the other issue in my gif with cs_CZ-qwertz.

Hey @jizi. What do you see in the keybinding resolver Ctrl+- when you type Alt+ú, Alt+), Alt+Shift+/ and Alt+Shift+(.

@jizi In addition to my above comment can you test the latest version of Atom 1.12.4? We made major changes to how Ctrl-Alt keybindings resolve in this version that can affect this issue.

jizi commented

Hi @Ben3eeE. Unfortunately it seems upgrading to latest version hasn't helped.

To your first question:
AltGr+ú -> Alt+Ctrl+[
AltGr+) -> Alt+Ctrl+]
AltGr+/ -> Alt+Ctrl+{
AltGr+( -> Alt+Ctrl+}

In case of 'working' combinations e.g. AltGr+ě it is resolved correctly as @ in keybinding resolver.

@jizi Do you still have keyboard-localization installed? Can you try to start Atom using atom --safe and see if that changes what your keys resolve to?

I just tested on Windows 7. Installed Czech qwerty and AltGr+ú resolves to [ for me.

jizi commented

@Ben3eeE: yes, atom-keyboard-localization is still installed but disabled in package configuration. When I enable it then it works correctly. In the beginning I also tried to uninstall it completely but didn't observe any difference to disabled state.

Regarding the --safe mode no change unfortunately.

Hey, I still can't reproduce the problem you are seeing. I have some more questions.

  • What operating system are you using?
  • What does ú show up as in the keybinding resolver?
  • Can you enter the following code in to the dev tools console and post the results when you press these keys. You can open the dev tools with Ctrl-Shift-I
document.addEventListener('keydown', e => console.log(e), true)
jizi commented

Hm, strange.

  • I am on Win7 Enterprise.
  • ú
  • While checking this point I observed this strange warning in log spell-check:en-us Can't load en_US: Cannot find dictionary for en_US. This gave me idea what should be the issue and really I was able to confirm it.

By default I use en_US locales it means Atom is started with en_US but then when I need to write in Czech I switch the keyboard and then the reported issue appears. When I changed default locales to czech and started Atom keys resolve correctly.

So imho there is an issue when switching keyboard layout while writing in Atom the application doesn't handle the switch correctly or OS is not notifying correctly.

Hey, this seems very strange indeed. @ungb can you try to reproduce this with the given information.

@jizi We have changed the way we detect keyboard layout changes on master. This will be included in the next hotfix release and should fix this issue. Thank you very much for your help 🙇

jizi commented

@Ben3eeE Great news. Looking forward to it. Thanks for your work.

jizi commented

Hi @Ben3eeE, now I've updated to Atom 1.12.6 and the issue is gone. Thanks a lot.

Hey, thanks for reporting back. Happy to hear it got fixed.