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

Improve support for international keyboards #12697

Merged
merged 6 commits into from Sep 20, 2016

Conversation

Projects
None yet
@nathansobo
Contributor

nathansobo commented Sep 15, 2016

Closes atom/atom-keymap#35
Closes atom/atom-keymap#34

This PR includes a new version of atom-keymap with changes described in atom/atom-keymap#144.

The basic idea is that we will never shadow the ability to type an ASCII character with any key binding. Most of this logic is handled in atom-keymap and is describe in the above PR.

In addition to the keymap changes, we are forced to omit keyboard shortcuts for application menu items if there's a possibility they could interfere with typing AltGraph-modified characters on international layouts. This means that alt- bindings on Mac and ctrl-alt- bindings on Windows won't show up in the menu, but the bindings will still work so long as they don't conflict.

I'd appreciate it if international users could give this a try by downloading binaries from the build provider for their platform. You can find links to builds of this PR in the build status section at the bottom of this page, then navigate to the "artifacts" section:

  • For Windows, go to AppVeyor artifiacts
  • For Mac, go to Circle artifacts
  • For Linux, go to Travis, where you can find the S3 download URLs in the build log

nathansobo added some commits Sep 14, 2016

Don't allow menu shortcuts that could conflict with AltGraph characters
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Sep 15, 2016

My Platform: Windows 10 / 64bit (not that it matters) / German Keyboard Layout

I'll go over all the keys that don't work in 1.10 for me and how it compares to the new version. This is sorted by position on the keybard in english text reading direction.

  • ² and ³ AltGr+2 and AltGr+3 worked before, keeps working
  • {[]} AltGr+7 through AltGr+0 worked before, keeps working. (You may wonder how one even programs on a german keybard, right now. And you would be right.)
  • \ AltGr+ß works fine (did not do anything before) 👍
  • @ AltGr+Q will insert an @ symbol (reflowed text before) 👍
  • AltGr+E worked before, keeps working.
  • ~ AltGr++ works fine (did not do anything before) 👍
  • | AltGr+< worked before, keeps working
  • µ AltGr+M works fine (did not do anything before) 👍

Additionally, on a german keyboard, there's no single key for /, so the usual shortcut Ctrl+/ (to comment out a block of selected code) is actually Ctrl+Shift+7 - because / is Shift+7. Earlier, this did not work at all (just did nothing), on this branch it works as expected! 👍 (so this might well have fixed atom/atom-keymap#34 along the way)

In short: It's all good and more than I'd hoped for! Now let's hope everyone else is happy as well :)

ccoenen commented Sep 15, 2016

My Platform: Windows 10 / 64bit (not that it matters) / German Keyboard Layout

I'll go over all the keys that don't work in 1.10 for me and how it compares to the new version. This is sorted by position on the keybard in english text reading direction.

  • ² and ³ AltGr+2 and AltGr+3 worked before, keeps working
  • {[]} AltGr+7 through AltGr+0 worked before, keeps working. (You may wonder how one even programs on a german keybard, right now. And you would be right.)
  • \ AltGr+ß works fine (did not do anything before) 👍
  • @ AltGr+Q will insert an @ symbol (reflowed text before) 👍
  • AltGr+E worked before, keeps working.
  • ~ AltGr++ works fine (did not do anything before) 👍
  • | AltGr+< worked before, keeps working
  • µ AltGr+M works fine (did not do anything before) 👍

Additionally, on a german keyboard, there's no single key for /, so the usual shortcut Ctrl+/ (to comment out a block of selected code) is actually Ctrl+Shift+7 - because / is Shift+7. Earlier, this did not work at all (just did nothing), on this branch it works as expected! 👍 (so this might well have fixed atom/atom-keymap#34 along the way)

In short: It's all good and more than I'd hoped for! Now let's hope everyone else is happy as well :)

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 16, 2016

Member

Can confirm that this also fixes atom/atom-keymap#34 for me. In Atom 1.10.2 this does nothing and in 1.12-dev-88f4799 it works. Seems the keybinding resolver reports the incorrect key for something like Shift+2 in Atom 1.10 in addition to AltGr keys. I can add these to the test case if wanted I did it anyway.

I can add results on Windows 10 later during the day.

My Platform: Windows 7 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-88f4799

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes @
£ AltGr+3 Yes Ctrl+Alt+3
$ AltGr+4 Yes $
{ AltGr+7 Yes {
[ AltGr+8 Yes [
] AltGr+9 Yes ]
} AltGr+0 Yes }
\ AltGr++ Yes </kbd>
~ AltGr+¨ Yes Ctrl+Alt+] bound to editor:unfold-current-row, should be dead first keypress
| AltGr+< Yes |
AltGr+E Yes Ctrl+Alt+E
µ AltGr+M No Ctrl+Alt+M bound to bracket-matcher:select-inside-brackets
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes !
" Shift+2 Yes "
# Shift+3 Yes #
¤ Shift+4 Yes ¤
% Shift+5 Yes %
& Shift+6 Yes &
/ Shift+7 Yes /
( Shift+8 Yes (
) Shift+9 Yes )
= Shift+0 Yes =
? Shift++ Yes ?
` Shift+´ Yes `
^ Shift+¨ Yes ^ (shift-dead first time then resolves to ^ which is correct)
* Shift+' Yes *
_ Shift+- Yes _
: Shift+. Yes :
; Shift+, Yes ;
< < Yes <
> Shift+< Yes >

My Platform: Windows 7 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.10.2

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes Ctrl+Alt+2
£ AltGr+3 Yes Ctrl+Alt+3
$ AltGr+4 Yes Ctrl+Alt+4
{ AltGr+7 Yes Ctrl+Alt+7
[ AltGr+8 Yes Ctrl+Alt+8
] AltGr+9 Yes Ctrl+Alt+9
} AltGr+0 Yes Ctrl+Alt+0
\ AltGr++ No Ctrl+Alt+= bound to pane:increase-size
~ AltGr+¨ Yes Ctrl+Alt+;
| AltGr+< Yes Ctrl+Alt+â I think its that a hard to see.
AltGr+E Yes Ctrl+Alt+E
µ AltGr+M No Ctrl+Alt+M bound to bracket-matcher:select-inside-brackets
å å Yes ]
ä ä Yes ' I think it's this key hard to see.
ö ö Yes ` I think it's this key hard to see.
Å Å Yes }
Ä Ä Yes "
Ö Ö Yes ~
½ Shift+§ Yes |
! Shift+1 Yes !
" Shift+2 Yes @
# Shift+3 Yes #
¤ Shift+4 Yes $
% Shift+5 Yes %
& Shift+6 Yes ^
/ Shift+7 Yes &
( Shift+8 Yes *
) Shift+9 Yes (
= Shift+0 Yes )
? Shift++ Yes +
` Shift+´ Yes {
^ Shift+¨ Yes :
* Shift+' Yes ?
_ Shift+- Yes _
: Shift+. Yes >
; Shift+, Yes <
< < Yes â I think its that a hard to see.
> Shift+< Yes â I think its that a hard to see.
Member

Ben3eeE commented Sep 16, 2016

Can confirm that this also fixes atom/atom-keymap#34 for me. In Atom 1.10.2 this does nothing and in 1.12-dev-88f4799 it works. Seems the keybinding resolver reports the incorrect key for something like Shift+2 in Atom 1.10 in addition to AltGr keys. I can add these to the test case if wanted I did it anyway.

I can add results on Windows 10 later during the day.

My Platform: Windows 7 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-88f4799

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes @
£ AltGr+3 Yes Ctrl+Alt+3
$ AltGr+4 Yes $
{ AltGr+7 Yes {
[ AltGr+8 Yes [
] AltGr+9 Yes ]
} AltGr+0 Yes }
\ AltGr++ Yes </kbd>
~ AltGr+¨ Yes Ctrl+Alt+] bound to editor:unfold-current-row, should be dead first keypress
| AltGr+< Yes |
AltGr+E Yes Ctrl+Alt+E
µ AltGr+M No Ctrl+Alt+M bound to bracket-matcher:select-inside-brackets
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes !
" Shift+2 Yes "
# Shift+3 Yes #
¤ Shift+4 Yes ¤
% Shift+5 Yes %
& Shift+6 Yes &
/ Shift+7 Yes /
( Shift+8 Yes (
) Shift+9 Yes )
= Shift+0 Yes =
? Shift++ Yes ?
` Shift+´ Yes `
^ Shift+¨ Yes ^ (shift-dead first time then resolves to ^ which is correct)
* Shift+' Yes *
_ Shift+- Yes _
: Shift+. Yes :
; Shift+, Yes ;
< < Yes <
> Shift+< Yes >

My Platform: Windows 7 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.10.2

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes Ctrl+Alt+2
£ AltGr+3 Yes Ctrl+Alt+3
$ AltGr+4 Yes Ctrl+Alt+4
{ AltGr+7 Yes Ctrl+Alt+7
[ AltGr+8 Yes Ctrl+Alt+8
] AltGr+9 Yes Ctrl+Alt+9
} AltGr+0 Yes Ctrl+Alt+0
\ AltGr++ No Ctrl+Alt+= bound to pane:increase-size
~ AltGr+¨ Yes Ctrl+Alt+;
| AltGr+< Yes Ctrl+Alt+â I think its that a hard to see.
AltGr+E Yes Ctrl+Alt+E
µ AltGr+M No Ctrl+Alt+M bound to bracket-matcher:select-inside-brackets
å å Yes ]
ä ä Yes ' I think it's this key hard to see.
ö ö Yes ` I think it's this key hard to see.
Å Å Yes }
Ä Ä Yes "
Ö Ö Yes ~
½ Shift+§ Yes |
! Shift+1 Yes !
" Shift+2 Yes @
# Shift+3 Yes #
¤ Shift+4 Yes $
% Shift+5 Yes %
& Shift+6 Yes ^
/ Shift+7 Yes &
( Shift+8 Yes *
) Shift+9 Yes (
= Shift+0 Yes )
? Shift++ Yes +
` Shift+´ Yes {
^ Shift+¨ Yes :
* Shift+' Yes ?
_ Shift+- Yes _
: Shift+. Yes >
; Shift+, Yes <
< < Yes â I think its that a hard to see.
> Shift+< Yes â I think its that a hard to see.
@vgrigoriu

This comment has been minimized.

Show comment
Hide comment
@vgrigoriu

vgrigoriu Sep 16, 2016

Windows 10, Romanian Programmers keyboard: AltGr + I (î) and AltGr + Q (â) don't work. AltGr + (A, S, T) work fine.

vgrigoriu commented Sep 16, 2016

Windows 10, Romanian Programmers keyboard: AltGr + I (î) and AltGr + Q (â) don't work. AltGr + (A, S, T) work fine.

@thomasjo

This comment has been minimized.

Show comment
Hide comment
@thomasjo

thomasjo Sep 16, 2016

Member

@vgrigoriu Can you verify whether those keybinds that don't work are bound to commands on your setup? I suspect they are, but would be great to verify my assumption.

Easiest way to check is to use the keybinding resolver (ctrl-.).

Member

thomasjo commented Sep 16, 2016

@vgrigoriu Can you verify whether those keybinds that don't work are bound to commands on your setup? I suspect they are, but would be great to verify my assumption.

Easiest way to check is to use the keybinding resolver (ctrl-.).

@vgrigoriu

This comment has been minimized.

Show comment
Hide comment
@vgrigoriu

vgrigoriu Sep 16, 2016

AltGr-Q appears as ctrl-alt-q - autoreflow:reflow-selection. AltGr-I as ctrl-alt-i - window:toggle-dev-tools.

vgrigoriu commented Sep 16, 2016

AltGr-Q appears as ctrl-alt-q - autoreflow:reflow-selection. AltGr-I as ctrl-alt-i - window:toggle-dev-tools.

@thomasjo

This comment has been minimized.

Show comment
Hide comment
@thomasjo

thomasjo Sep 16, 2016

Member

@vgrigoriu Thanks for verifying 🙇

Member

thomasjo commented Sep 16, 2016

@vgrigoriu Thanks for verifying 🙇

@vgrigoriu

This comment has been minimized.

Show comment
Hide comment
@vgrigoriu

vgrigoriu Sep 16, 2016

Also not working:

  • AltGr-[ - editor:fold-current-row
  • AltGr-] - editor:unfold-current-row (they're supposed to be „ and ”)
  • AltGr-. - bracket-matcher:close-tag (this is », which admitedly is a character rarely used)

vgrigoriu commented Sep 16, 2016

Also not working:

  • AltGr-[ - editor:fold-current-row
  • AltGr-] - editor:unfold-current-row (they're supposed to be „ and ”)
  • AltGr-. - bracket-matcher:close-tag (this is », which admitedly is a character rarely used)
@nereusz

This comment has been minimized.

Show comment
Hide comment
@nereusz

nereusz Sep 16, 2016

Windows 10, Polish Programmers keyboard. Two polish letters still not working (due to default shortcuts):

  • AltGr+o (should produce ó) - in win32.cson combination ctrl-alt-o is binded to application:add-project-folder
  • AltGr+z (should produce ż) - in win32.cson combination alt-ctrl-z is binded to editor:checkout-head-revision

nereusz commented Sep 16, 2016

Windows 10, Polish Programmers keyboard. Two polish letters still not working (due to default shortcuts):

  • AltGr+o (should produce ó) - in win32.cson combination ctrl-alt-o is binded to application:add-project-folder
  • AltGr+z (should produce ż) - in win32.cson combination alt-ctrl-z is binded to editor:checkout-head-revision
@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 16, 2016

Member

I tested all keys on Windows 10 and see no difference compared to what I reported on Windows 7. I did notice that AltGr+5 writes and resolves to Ctrl+Alt+5. Didn't even know that this existed as a possibility as it is not printed on my keyboard but seems to be the case in every program on Windows 10.

Did also notice that this PR breaks the keyboard-localization package, maybe understandably so. Some keys that are supposed to be dead on first press write Dead in the document when activated and for example ! resolves to Shift+! instead of !

Member

Ben3eeE commented Sep 16, 2016

I tested all keys on Windows 10 and see no difference compared to what I reported on Windows 7. I did notice that AltGr+5 writes and resolves to Ctrl+Alt+5. Didn't even know that this existed as a possibility as it is not printed on my keyboard but seems to be the case in every program on Windows 10.

Did also notice that this PR breaks the keyboard-localization package, maybe understandably so. Some keys that are supposed to be dead on first press write Dead in the document when activated and for example ! resolves to Shift+! instead of !

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Sep 16, 2016

The hope is, that this PR will make the (very much appreciated!) package keyboard-localisation obsolete by fixing the original problem.

@Ben3eeE What keyboard layout are you on?

ccoenen commented Sep 16, 2016

The hope is, that this PR will make the (very much appreciated!) package keyboard-localisation obsolete by fixing the original problem.

@Ben3eeE What keyboard layout are you on?

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 16, 2016

Member

Swedish keyboard layout, said in my first comment 👆
Comment regarding the (very much appreciated indeed) keyboard-localization package was just so it doesn't get forgotten once this is released, quite many have it installed and might be confused when this is released and doesn't work because of it.

Member

Ben3eeE commented Sep 16, 2016

Swedish keyboard layout, said in my first comment 👆
Comment regarding the (very much appreciated indeed) keyboard-localization package was just so it doesn't get forgotten once this is released, quite many have it installed and might be confused when this is released and doesn't work because of it.

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Sep 16, 2016

Contributor

So far, this PR only protects basic ASCII characters required for typical programming from being shadowed by bindings. Characters like µ, î, , and ż, because they are outside of basic ASCII, are not protected by default... This approach is really important on OS X because is used really aggressively by Apple to provide alternative keys for every key in every layout, keys which are often much less important than the alt- bindings they would be replacing.

My original thinking was to apply the same approach on Windows, favoring the ability to type a default ctrl-alt- binding unless it interfered with typing characters like [, @ etc. If users wanted to type a non-ASCII character, they could use unset! to clear the conflicting binding. Based on this feedback I'm starting to think that's the wrong approach on Windows. Unlike OS X, Windows layouts seem to be much more sparing with AltGr-modified characters, so it's probably safe to assume that if an AltGr variant exists, the user wants to have access to it. Does that seem reasonable to everyone?

I've asked our Windows expert @damieng to propose comprehensive reform to our default bindings on Windows, but that's going to take more time. For now, are people comfortable making their own substitutes for ctrl-alt- bindings when the defaults are shadowed by AltGr characters?

Contributor

nathansobo commented Sep 16, 2016

So far, this PR only protects basic ASCII characters required for typical programming from being shadowed by bindings. Characters like µ, î, , and ż, because they are outside of basic ASCII, are not protected by default... This approach is really important on OS X because is used really aggressively by Apple to provide alternative keys for every key in every layout, keys which are often much less important than the alt- bindings they would be replacing.

My original thinking was to apply the same approach on Windows, favoring the ability to type a default ctrl-alt- binding unless it interfered with typing characters like [, @ etc. If users wanted to type a non-ASCII character, they could use unset! to clear the conflicting binding. Based on this feedback I'm starting to think that's the wrong approach on Windows. Unlike OS X, Windows layouts seem to be much more sparing with AltGr-modified characters, so it's probably safe to assume that if an AltGr variant exists, the user wants to have access to it. Does that seem reasonable to everyone?

I've asked our Windows expert @damieng to propose comprehensive reform to our default bindings on Windows, but that's going to take more time. For now, are people comfortable making their own substitutes for ctrl-alt- bindings when the defaults are shadowed by AltGr characters?

@Zireael07

This comment has been minimized.

Show comment
Hide comment
@Zireael07

Zireael07 Sep 16, 2016

AltGr-modified characters are unavoidable in some languages - Polish (ó and ż) and Romanian, for instance.

@Ben3eeE: Are you using AltGr to enter Ä? Or is Swedish keyboard layout using some other option?

Zireael07 commented Sep 16, 2016

AltGr-modified characters are unavoidable in some languages - Polish (ó and ż) and Romanian, for instance.

@Ben3eeE: Are you using AltGr to enter Ä? Or is Swedish keyboard layout using some other option?

@thomasjo

This comment has been minimized.

Show comment
Hide comment
@thomasjo

thomasjo Sep 16, 2016

Member

@Zireael07 On Swedish keyboards äöå each have their own physical key. Similarly æøå have their own keys on Norwegian and Danish keyboards.

Member

thomasjo commented Sep 16, 2016

@Zireael07 On Swedish keyboards äöå each have their own physical key. Similarly æøå have their own keys on Norwegian and Danish keyboards.

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 16, 2016

Member

@nathansobo This is an improvement over the previous behavior for sure. For me this would work fine because the conflicting keys is something I never use when programming, except I am unsure about ~ thought. ~ is a common ascii character that conflicts with a keybinding and is also used in some programming languages?

Member

Ben3eeE commented Sep 16, 2016

@nathansobo This is an improvement over the previous behavior for sure. For me this would work fine because the conflicting keys is something I never use when programming, except I am unsure about ~ thought. ~ is a common ascii character that conflicts with a keybinding and is also used in some programming languages?

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Sep 16, 2016

Contributor

Thanks to everyone for the thorough investigation and help on this. I've pushed another commit upgrading atom-keymap to to 6.3.4, which includes changes from atom/atom-keymap#145 to always favor alt-graph variants on Windows if they exist. This should allow all AltGr characters, not just ASCII, to be typed on Windows without interference from bindings. When the builds go green, maybe Windows users could give it another try?

Are people cool creating their own bindings for the defaults that end up getting shadowed until we can reform our default set?

Contributor

nathansobo commented Sep 16, 2016

Thanks to everyone for the thorough investigation and help on this. I've pushed another commit upgrading atom-keymap to to 6.3.4, which includes changes from atom/atom-keymap#145 to always favor alt-graph variants on Windows if they exist. This should allow all AltGr characters, not just ASCII, to be typed on Windows without interference from bindings. When the builds go green, maybe Windows users could give it another try?

Are people cool creating their own bindings for the defaults that end up getting shadowed until we can reform our default set?

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 16, 2016

Member

@nathansobo This is an improvement but writing ~ is still not working correctly. The ~ character is on a weird key on swedish layout where every combination is dead on the first press and on the next press the character appears. This is because we use it to write characters like ã by first typing AltGr+¨ and then a. The possible characters to write with this key are ¨ without modifier, ^ with shift modifier and ~ with AltGr modifier. All work fine and report dead except ~.

I am cool with having it like this and making my own keybindings until you can reform the default set.

Full test results for comparison below:

My Platform: Windows 10 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-290c4ec

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes @
£ AltGr+3 Yes £
$ AltGr+4 Yes $
{ AltGr+7 Yes {
[ AltGr+8 Yes [
] AltGr+9 Yes ]
} AltGr+0 Yes }
\ AltGr++ Yes </kbd>
~ AltGr+¨ Yes Ctrl+Alt+] bound to editor:unfold-current-row, should be dead first keypress
| AltGr+< Yes |
AltGr+E Yes
µ AltGr+M Yes µ
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes !
" Shift+2 Yes "
¤ Shift+4 Yes ¤
% Shift+5 Yes %
& Shift+6 Yes &
/ Shift+7 Yes /
( Shift+8 Yes (
) Shift+9 Yes )
= Shift+0 Yes =
? Shift++ Yes ?
` Shift+´ Yes </kbd> (shift-dead first time then resolves to which is correct)
^ Shift+¨ Yes ^ (shift-dead first time then resolves to ^ which is correct)
* Shift+' Yes *
_ Shift+- Yes _
: Shift+. Yes :
; Shift+, Yes ;
< < Yes <
> Shift+< Yes >
Member

Ben3eeE commented Sep 16, 2016

@nathansobo This is an improvement but writing ~ is still not working correctly. The ~ character is on a weird key on swedish layout where every combination is dead on the first press and on the next press the character appears. This is because we use it to write characters like ã by first typing AltGr+¨ and then a. The possible characters to write with this key are ¨ without modifier, ^ with shift modifier and ~ with AltGr modifier. All work fine and report dead except ~.

I am cool with having it like this and making my own keybindings until you can reform the default set.

Full test results for comparison below:

My Platform: Windows 10 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-290c4ec

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes @
£ AltGr+3 Yes £
$ AltGr+4 Yes $
{ AltGr+7 Yes {
[ AltGr+8 Yes [
] AltGr+9 Yes ]
} AltGr+0 Yes }
\ AltGr++ Yes </kbd>
~ AltGr+¨ Yes Ctrl+Alt+] bound to editor:unfold-current-row, should be dead first keypress
| AltGr+< Yes |
AltGr+E Yes
µ AltGr+M Yes µ
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes !
" Shift+2 Yes "
¤ Shift+4 Yes ¤
% Shift+5 Yes %
& Shift+6 Yes &
/ Shift+7 Yes /
( Shift+8 Yes (
) Shift+9 Yes )
= Shift+0 Yes =
? Shift++ Yes ?
` Shift+´ Yes </kbd> (shift-dead first time then resolves to which is correct)
^ Shift+¨ Yes ^ (shift-dead first time then resolves to ^ which is correct)
* Shift+' Yes *
_ Shift+- Yes _
: Shift+. Yes :
; Shift+, Yes ;
< < Yes <
> Shift+< Yes >
@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Sep 16, 2016

Contributor

Pushed another upgrade of atom-keymap with changes from atom/atom-keymap#146, which I think should resolve the issues with dead keys on Mac and Windows. Linux will take more work.

@Ben3eeE Can you test again once we get another green build and see if dead keys on the Swedish layout like ¨ are resolving to the correct keystrokes? @thomasjo Maybe you could give this a spin on macOS as well?

Contributor

nathansobo commented Sep 16, 2016

Pushed another upgrade of atom-keymap with changes from atom/atom-keymap#146, which I think should resolve the issues with dead keys on Mac and Windows. Linux will take more work.

@Ben3eeE Can you test again once we get another green build and see if dead keys on the Swedish layout like ¨ are resolving to the correct keystrokes? @thomasjo Maybe you could give this a spin on macOS as well?

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 17, 2016

Member

@nathansobo Dead keys all work in the latest commit and doesn't resolve to some other combination. This changes it so that they never resolve to dead. So if you for some reason would want to bind a command to ~ it would activate when you want to write ã. Maybe it is fine like this I have no idea how other programs work or what the expected behavior would be in this case as I have never had the idea to bind something to a dead key.

I tested all combinations as previously and everything still works. I double checked that this still closes atom/atom-keymap#34. I bound some commands to some keys to verify that it worked as expected. 👍 🚢

Member

Ben3eeE commented Sep 17, 2016

@nathansobo Dead keys all work in the latest commit and doesn't resolve to some other combination. This changes it so that they never resolve to dead. So if you for some reason would want to bind a command to ~ it would activate when you want to write ã. Maybe it is fine like this I have no idea how other programs work or what the expected behavior would be in this case as I have never had the idea to bind something to a dead key.

I tested all combinations as previously and everything still works. I double checked that this still closes atom/atom-keymap#34. I bound some commands to some keys to verify that it worked as expected. 👍 🚢

@thomasjo

This comment has been minimized.

Show comment
Hide comment
@thomasjo

thomasjo Sep 17, 2016

Member

@nathansobo Zero issues on macOS, and did not notice any issues in Ubuntu 16.04. "Dead keys" such as ¨ work as expected. Additionally I have no problems producing the tilde character (~). So I guess se and no layouts differ in that regard.

Member

thomasjo commented Sep 17, 2016

@nathansobo Zero issues on macOS, and did not notice any issues in Ubuntu 16.04. "Dead keys" such as ¨ work as expected. Additionally I have no problems producing the tilde character (~). So I guess se and no layouts differ in that regard.

@Guichaguri

This comment has been minimized.

Show comment
Hide comment
@Guichaguri

Guichaguri Sep 17, 2016

All issues seems to be fixed, including dead keys. I'm using an ABNT2 keyboard on Windows 10.
I'm glad ctrl+? is finally fixed, it used to be recognized as ctrl+Á.

Guichaguri commented Sep 17, 2016

All issues seems to be fixed, including dead keys. I'm using an ABNT2 keyboard on Windows 10.
I'm glad ctrl+? is finally fixed, it used to be recognized as ctrl+Á.

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Sep 20, 2016

Contributor

@Ben3eeE What happens when this combines with keyboard-localization. Is Atom completely broken? Do any features of keyboard-localization remain relevant in the face of these changes?

Contributor

nathansobo commented Sep 20, 2016

@Ben3eeE What happens when this combines with keyboard-localization. Is Atom completely broken? Do any features of keyboard-localization remain relevant in the face of these changes?

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 20, 2016

Member

Never mind. Seems that this is resolved the same way on stable so shouldnt be any problem. I got confused with all keybindings back and forth.

@nathansobo It changes every keybind to include the modifier so for example typing @ resolves to AltGr+@. Which means if I bind something to @ it doesn't activate with keyboard-localization installed. I actually found it activates when typing " which resolves to Shift-". Also something is weird with activating it prints Dead in my TextEditor.
So having keyboard-localization installed combined with this makes nothing work as expected. Almost every key using AltGr and Shift modifiers stop working. In it's current state I see no use for keyboard-localization after these changes land on stable.~~~

Included full test tables for comparison below.

(I don't have much knowledge about all the features of the keyboard-localization package or how it resolves keys on stable. I just installed it to be able to write every key and it worked perfectly until I was testing this PR)

Without keyboard-localization

My Platform: Windows 10 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-dbb8dec

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes @
£ AltGr+3 Yes £
$ AltGr+4 Yes $
{ AltGr+7 Yes {
[ AltGr+8 Yes [
] AltGr+9 Yes ]
} AltGr+0 Yes }
\ AltGr++ Yes </kbd>
~ AltGr+¨ Yes ~
| AltGr+< Yes |
AltGr+E Yes
µ AltGr+M Yes µ
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes !
" Shift+2 Yes "
¤ Shift+4 Yes ¤
% Shift+5 Yes %
& Shift+6 Yes &
/ Shift+7 Yes /
( Shift+8 Yes (
) Shift+9 Yes )
= Shift+0 Yes =
? Shift++ Yes ?
` Shift+´ Yes `
^ Shift+¨ Yes ^
* Shift+' Yes *
_ Shift+- Yes _
: Shift+. Yes :
; Shift+, Yes ;
< < Yes <
> Shift+< Yes >

With keyboard-localization installed

My Platform: Windows 10 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-dbb8dec

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes AltGr-@
£ AltGr+3 Yes AltGr-£
$ AltGr+4 Yes AltGr-$
{ AltGr+7 Yes AltGr-{
[ AltGr+8 Yes AltGr-[
] AltGr+9 Yes AltGr-]
} AltGr+0 Yes AltGr-}
\ AltGr++ Yes AltGr-</kbd>
~ AltGr+¨ Yes AltGr-~ Writes Dead in the TextEditor.
| AltGr+< Yes AltGr-|
AltGr+E Yes AltGr-€
µ AltGr+M Yes AltGr-µ
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes Shift-!
" Shift+2 Yes Shift-" (Activates on @)
¤ Shift+4 Yes Shift-¤
% Shift+5 Yes Shift-%
& Shift+6 Yes Shift-&
/ Shift+7 Yes Shift-/
( Shift+8 Yes Shift-(
) Shift+9 Yes Shift-)
= Shift+0 Yes Shift-=
? Shift++ Yes Shift-?
` Shift+´ Yes Shift-`
^ Shift+¨ Yes Shift-^
* Shift+' Yes Shift-*
_ Shift+- Yes Shift-_
: Shift+. Yes Shift-:
; Shift+, Yes Shift-;
< < Yes <
> Shift+< Yes Shift->
Member

Ben3eeE commented Sep 20, 2016

Never mind. Seems that this is resolved the same way on stable so shouldnt be any problem. I got confused with all keybindings back and forth.

@nathansobo It changes every keybind to include the modifier so for example typing @ resolves to AltGr+@. Which means if I bind something to @ it doesn't activate with keyboard-localization installed. I actually found it activates when typing " which resolves to Shift-". Also something is weird with activating it prints Dead in my TextEditor.
So having keyboard-localization installed combined with this makes nothing work as expected. Almost every key using AltGr and Shift modifiers stop working. In it's current state I see no use for keyboard-localization after these changes land on stable.~~~

Included full test tables for comparison below.

(I don't have much knowledge about all the features of the keyboard-localization package or how it resolves keys on stable. I just installed it to be able to write every key and it worked perfectly until I was testing this PR)

Without keyboard-localization

My Platform: Windows 10 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-dbb8dec

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes @
£ AltGr+3 Yes £
$ AltGr+4 Yes $
{ AltGr+7 Yes {
[ AltGr+8 Yes [
] AltGr+9 Yes ]
} AltGr+0 Yes }
\ AltGr++ Yes </kbd>
~ AltGr+¨ Yes ~
| AltGr+< Yes |
AltGr+E Yes
µ AltGr+M Yes µ
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes !
" Shift+2 Yes "
¤ Shift+4 Yes ¤
% Shift+5 Yes %
& Shift+6 Yes &
/ Shift+7 Yes /
( Shift+8 Yes (
) Shift+9 Yes )
= Shift+0 Yes =
? Shift++ Yes ?
` Shift+´ Yes `
^ Shift+¨ Yes ^
* Shift+' Yes *
_ Shift+- Yes _
: Shift+. Yes :
; Shift+, Yes ;
< < Yes <
> Shift+< Yes >

With keyboard-localization installed

My Platform: Windows 10 / 64bit (not that it matters) / Swedish Keyboard Layout / 1.12-dev-dbb8dec

Key Keybind Can Write Keybinding Resolver
@ AltGr+2 Yes AltGr-@
£ AltGr+3 Yes AltGr-£
$ AltGr+4 Yes AltGr-$
{ AltGr+7 Yes AltGr-{
[ AltGr+8 Yes AltGr-[
] AltGr+9 Yes AltGr-]
} AltGr+0 Yes AltGr-}
\ AltGr++ Yes AltGr-</kbd>
~ AltGr+¨ Yes AltGr-~ Writes Dead in the TextEditor.
| AltGr+< Yes AltGr-|
AltGr+E Yes AltGr-€
µ AltGr+M Yes AltGr-µ
å å Yes å
ä ä Yes ä
ö ö Yes ö
Å Å Yes Shift+Å
Ä Ä Yes Shift+Ä
Ö Ö Yes Shift+Ö
½ Shift+§ Yes ½
! Shift+1 Yes Shift-!
" Shift+2 Yes Shift-" (Activates on @)
¤ Shift+4 Yes Shift-¤
% Shift+5 Yes Shift-%
& Shift+6 Yes Shift-&
/ Shift+7 Yes Shift-/
( Shift+8 Yes Shift-(
) Shift+9 Yes Shift-)
= Shift+0 Yes Shift-=
? Shift++ Yes Shift-?
` Shift+´ Yes Shift-`
^ Shift+¨ Yes Shift-^
* Shift+' Yes Shift-*
_ Shift+- Yes Shift-_
: Shift+. Yes Shift-:
; Shift+, Yes Shift-;
< < Yes <
> Shift+< Yes Shift->
@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 20, 2016

Member

Also ☝️ is only on keys that resolve to a character you want to type, a keybinding that doesn't resolve to some character on my layout still works with keyboard-localization installed for example binding Ctrl+Alt+1. So it's not as bad as I made it sound maybe I just realized right now that the tables I keep posting don't include tests for some keybind that doesn't resolve to a character. Which was the only tests I did with keyboard-localization.

Member

Ben3eeE commented Sep 20, 2016

Also ☝️ is only on keys that resolve to a character you want to type, a keybinding that doesn't resolve to some character on my layout still works with keyboard-localization installed for example binding Ctrl+Alt+1. So it's not as bad as I made it sound maybe I just realized right now that the tables I keep posting don't include tests for some keybind that doesn't resolve to a character. Which was the only tests I did with keyboard-localization.

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Sep 20, 2016

Contributor

Okay, so I'm tentatively thinking that we shouldn't do anything drastic like automatically disabling the localization package, since you seem to still be able to write various characters and if anybody uses the altgr- binding variants, it's not going to work without that package since we don't produce altgr-* keystrokes.

Contributor

nathansobo commented Sep 20, 2016

Okay, so I'm tentatively thinking that we shouldn't do anything drastic like automatically disabling the localization package, since you seem to still be able to write various characters and if anybody uses the altgr- binding variants, it's not going to work without that package since we don't produce altgr-* keystrokes.

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 20, 2016

Member

Seems I was mistaken and it looks the same way without this pr and is just the way this package behaves. i had the chance to test on beta again. All these keybindings back and forth are getting confusing.
So dont do anything drastic and 🚢

Member

Ben3eeE commented Sep 20, 2016

Seems I was mistaken and it looks the same way without this pr and is just the way this package behaves. i had the chance to test on beta again. All these keybindings back and forth are getting confusing.
So dont do anything drastic and 🚢

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Sep 20, 2016

Contributor

@Ben3eeE You're telling me. I'd like to express my appreciation again for all your help as we have waded through this.

Contributor

nathansobo commented Sep 20, 2016

@Ben3eeE You're telling me. I'd like to express my appreciation again for all your help as we have waded through this.

@nathansobo nathansobo merged commit fa41da1 into master Sep 20, 2016

8 checks passed

atom Build #4154310 succeeded in 1s
Details
atom-linux Build #4154311 succeeded in 1s
Details
atom-rpm Build #4154312 succeeded in 1s
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@defunkt defunkt removed the in progress label Sep 20, 2016

@nathansobo nathansobo deleted the ns-upgrade-atom-keymap branch Sep 20, 2016

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Sep 20, 2016

Member

The only issue that remains with keyboard-localization + this PR combined that I can find after I unconfuse myself and retest things is that it writes Dead in the TextEditor when I type tilde. This does not happen on Beta. Wonder why tilde is always the problematic character. Probably nothing major as you are still able to type tilde its just preceded by Dead. Something to keep in mind when this lands on stable as it might create an issue report or question on the forums.

Happy to help contributing for something that I will have much use for in the near future. Thanks for the work on this @nathansobo 🎉

Member

Ben3eeE commented Sep 20, 2016

The only issue that remains with keyboard-localization + this PR combined that I can find after I unconfuse myself and retest things is that it writes Dead in the TextEditor when I type tilde. This does not happen on Beta. Wonder why tilde is always the problematic character. Probably nothing major as you are still able to type tilde its just preceded by Dead. Something to keep in mind when this lands on stable as it might create an issue report or question on the forums.

Happy to help contributing for something that I will have much use for in the near future. Thanks for the work on this @nathansobo 🎉

@MarcoHat

This comment has been minimized.

Show comment
Hide comment
@MarcoHat

MarcoHat Sep 26, 2016

great job! 😄

MarcoHat commented Sep 26, 2016

great job! 😄

@johan-boule

This comment has been minimized.

Show comment
Hide comment
@johan-boule

johan-boule Oct 2, 2016

Has anyone tested this on Linux?

johan-boule commented Oct 2, 2016

Has anyone tested this on Linux?

@50Wliu

This comment has been minimized.

Show comment
Hide comment
@50Wliu

50Wliu Oct 2, 2016

Member

Yep - @thomasjo did on Ubuntu 16.04.

Member

50Wliu commented Oct 2, 2016

Yep - @thomasjo did on Ubuntu 16.04.

@ccoenen ccoenen referenced this pull request Oct 2, 2016

Closed

Handle the Windows Key #55

@simonepri

This comment has been minimized.

Show comment
Hide comment
@simonepri

simonepri Oct 6, 2016

CANNOT TYPE ']'

My Platform: Windows 10 / 64bit / Italian Keyboard Layout / 1.11.0-beta5

With the italian keyboard i'm not able to type ']' (closing square bracket)
All others AltGr characters are correctly mapped.

This is the italian layout:
207npfa

simonepri commented Oct 6, 2016

CANNOT TYPE ']'

My Platform: Windows 10 / 64bit / Italian Keyboard Layout / 1.11.0-beta5

With the italian keyboard i'm not able to type ']' (closing square bracket)
All others AltGr characters are correctly mapped.

This is the italian layout:
207npfa

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Oct 6, 2016

Contributor

@simonepri 1.12 beta should be out next week with the fixes.

Contributor

nathansobo commented Oct 6, 2016

@simonepri 1.12 beta should be out next week with the fixes.

@RoboWeb

This comment has been minimized.

Show comment
Hide comment
@RoboWeb

RoboWeb Nov 21, 2016

How to setup now polish programmer keyboard?
After update atom to v.1.12.4 and deprecated "keyboard-localistation" package - polish keyboard localisation dsn't work... It confused me...
I need this:
pl-programmers

RoboWeb commented Nov 21, 2016

How to setup now polish programmer keyboard?
After update atom to v.1.12.4 and deprecated "keyboard-localistation" package - polish keyboard localisation dsn't work... It confused me...
I need this:
pl-programmers

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Nov 21, 2016

Member

@RoboWeb You should not have to do anything to setup for your keyboard other than using this layout as your the layout in your OS. First of all try to disable keyboard-localization the package is deprecated and should no longer be needed. Please open a new issue at https://github.com/atom/atom-keymap/issues if the keyboard doesn't work for you detailing exactly which keys don't work and the problem you are experiencing. Along with additional information like operating system.

Member

Ben3eeE commented Nov 21, 2016

@RoboWeb You should not have to do anything to setup for your keyboard other than using this layout as your the layout in your OS. First of all try to disable keyboard-localization the package is deprecated and should no longer be needed. Please open a new issue at https://github.com/atom/atom-keymap/issues if the keyboard doesn't work for you detailing exactly which keys don't work and the problem you are experiencing. Along with additional information like operating system.

@MichaelKueller

This comment has been minimized.

Show comment
Hide comment
@MichaelKueller

MichaelKueller Dec 1, 2017

Is this also going to be implemented for Linux?

MichaelKueller commented Dec 1, 2017

Is this also going to be implemented for Linux?

@ccoenen

This comment has been minimized.

Show comment
Hide comment
@ccoenen

ccoenen Dec 1, 2017

@MichaelKueller this ticket is over a year old, as far as I know, this should work on all platforms. If you have problems with the keyboard support, it's probably better to open a new ticket with the specific problem you're facing.

ccoenen commented Dec 1, 2017

@MichaelKueller this ticket is over a year old, as far as I know, this should work on all platforms. If you have problems with the keyboard support, it's probably better to open a new ticket with the specific problem you're facing.

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