Live data from Hacker News

Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

tkainrad.dev

1–10 of 212 posts

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#2
It really surprised and disappointed me recently that native macOS apps have the same problem outlined here. For example, the standard system-wide ‘back’ shortcut (e.g. in Safari, Finder, Preview) is Cmd+[, but this is inoperable in many keyboard layouts that don’t have any key that produces [ without modifiers.

(For context: I was writing a simple mouse gestures utility that sends that keyboard shortcut to accomplish backward navigation for an appropriate gesture, but discovered this to be unreliable across keyboard layouts).

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#3
> For example, on my German layout, / is produced via Shift+7.

This is my #1 annoyance with German keyboards as someone who learned a UK layout and who needs to do lots of programming and terminal hacking (#2 is the swapping of Y and Z). I take it this layout was invented before Unix and its heavy use of forward slashes, but it does show how shortcuts are rather discriminatory. I know more than a few Germans who use UK or US keyboards because they dislike this unhappy feature.

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#4
Dead keys are particularly fun, as it takes two key presses to produce a result. Accessibility of keyboards/layout could indeed be improved. I switched to custom US layout, because of too many issues with a non-US layout. My custom layout uses AltGr combinations to add a few local characters. It is a bit clumsy, but at least keyboard shortcuts work most of the time.

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#6
post #3

> For example, on my German layout, / is produced via Shift+7. This is my #1 annoyance with German keyboards as someone who learned a UK layout and who needs to do lots of programming and terminal hacking (#2 is the swapping of Y and Z). I take it this layout was invented before Unix and its heavy use of forward slashes, but it does show how shortcuts are rather discriminatory. I know more than a few Germans who use…

I'm Chilean and I use the ANSI US layout because /, are much easier to type than using ISO keyboards.

When I need to type Spanish characters like áéíóú, ñ, etc. I switch to latin american ISO layout using WIN + Spacebar and then switch back.

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#7
> What baffles me is that the problem exists in apps used by millions of people every day, developed by gigantic corporations who pride themselves with having the best engineers in the world. Why is this baffling? Because the underlying technical issues are rather trivial!

> Hint for developers: Switch your computer’s keyboard layout to something other than US to debug your application’s shortcut handling on different layouts.

The problem with this and all the other X is broken and should be tested articles is that the testing burden is already enormous. Plenty of companies don’t even test with Firefox and/or Safari.

That’s really the problem that needs to be solved. How to reduce the testing burden.

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#8
post #2

It really surprised and disappointed me recently that native macOS apps have the same problem outlined here. For example, the standard system-wide ‘back’ shortcut (e.g. in Safari, Finder, Preview) is Cmd+[, but this is inoperable in many keyboard layouts that don’t have any key that produces [ without modifiers. (For context: I was writing a simple mouse gestures utility that sends that keyboard shortcut to accomplis…

[deleted]

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#9

Dead keys are particularly fun, as it takes two key presses to produce a result. Accessibility of keyboards/layout could indeed be improved. I switched to custom US layout, because of too many issues with a non-US layout. My custom layout uses AltGr combinations to add a few local characters. It is a bit clumsy, but at least keyboard shortcuts work most of the time.

Polish has a "traditional" (typewriter) and "programmer's" (US + AltGr) variants of the keyboard layout. Everyone uses the "programmer's" one, even people who don't know what programming is.

Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it

#10
post #3

> For example, on my German layout, / is produced via Shift+7. This is my #1 annoyance with German keyboards as someone who learned a UK layout and who needs to do lots of programming and terminal hacking (#2 is the swapping of Y and Z). I take it this layout was invented before Unix and its heavy use of forward slashes, but it does show how shortcuts are rather discriminatory. I know more than a few Germans who use…

> I take it this layout was invented before Unix and its heavy use of forward slashes

My guess would be that Unix chose many of its special characters and keyboard shortcuts precisely because they were easy to type on a US keyboard.

Post reply on HN