Live data from Hacker News

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

tkainrad.dev

81–90 of 212 posts

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

#81

There is also a whole slew of issues with Polish characters. Polish keyboard setup relies on "right-alt" and a letter to get it's diacritics variation. Ie: 'ą' is 'right-alt'+a Windows for backwards compatibility reports 'right-alt' as 'alt+control'. Many applications developers assign key combos with no negative checks. So 'ctrl-s', typically used for save gets triggered when user wants to type 'ś'. To repeat, "righ…

The same applies for a bunch of other languages with a character that's "s" with diacritic modifier, and ctrl-s as save isn't as bad - the most horrible case of this that I had was an old version of outlook webmail that I had to use for one client rarely, where ctrl-s was bound to 'send'. With no option to re-bind or disable it. So about half of the time when I'd get to writing an email it got sent in the middle of the sentence right before where a letter ś would be... And since I had to use it rarely, I never got used to it enough to switch keybord layouts.

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

#82
post #63
post #28

As a kid, I remember being utterly confused, when most games with a console would have the key ` to open it. WTF is the key ` and where is it? For a kid it wasn't that easy to understand that there are such things as different keyboard layouts. Turns out that ` is a single key press to the left of the '1', in English, while it is a bit obscure character to write in other languages. In mine, you have º and ª in that p…

We all suffer from character blindness of some sort. For you: ` - that thing isn't formally defined in English either as far as I know. In English we don't have any diacritics. We do have a few extra symbols, beyond the alphabet for certain situations. Quotations ... " ... meh should be 66 99 and that will be fixed up by DTP software. We use ' to denote a dropped letter - abbreviation. There are a few others. I won't…

It's the grave accent - pretty rare in English outside of loan words from other languages.

https://en.wikipedia.org/wiki/Grave_accent#English

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

#83
post #28

As a kid, I remember being utterly confused, when most games with a console would have the key ` to open it. WTF is the key ` and where is it? For a kid it wasn't that easy to understand that there are such things as different keyboard layouts. Turns out that ` is a single key press to the left of the '1', in English, while it is a bit obscure character to write in other languages. In mine, you have º and ª in that p…

> In mine, you have º and ª in that place...

Out of curiosity, what keyboard layout do you use?

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

#85

For Western European devs: do try the "USA International (AltGr dead keys)" layout. It's great for programming and quite good for all the Western European languages (maybe not so much for Eastern European languages that are more creative with diacritics). I wish I'd known about it before spending a lot of time creating my own custom layout for Linux and Windows, although since I went through the trouble that's what I…

It totally f—ks up handling of quotes though. I just cannot stand it, personally.

These days, on Windows, I use the Colemak layout, which has a alt-` meta-combo to type common accented letters - I assign that to caps-lock+A with AutoHotKey, and “Bob est ton oncle”.

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

#86

Earlier quoted context omitted.

It's the other way around. The keyboard was the foundation for the programming languages and shortcuts, like moving with hjkl in vim. No German keyboard user would have created a language like C with curly braces, when you would break your fingers typing this (alt 8 is {, alt 9 is }, and alt+5 is [, alt+6 is ] ). I use a US keyboard for that exact reason

I reassign my Caps lock key as a third level modifier. That way I can type { with Caps Lock + 7. Caps lock is so large I can comfortably use my pinky and ring finger to press and hold it, while I use my right hand to press 7, 8, 9 or 0 for {, [, ], } respectively.

I do something similar: http://blog.pythonaro.com/2020/06/better-access-to-special-c...

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

#87
post #28

As a kid, I remember being utterly confused, when most games with a console would have the key ` to open it. WTF is the key ` and where is it? For a kid it wasn't that easy to understand that there are such things as different keyboard layouts. Turns out that ` is a single key press to the left of the '1', in English, while it is a bit obscure character to write in other languages. In mine, you have º and ª in that p…

I remember that too.

But the console you only open sometimes.

But everyday(!), I have to use {[(| ... and they are just awkward to reach on a german layout.

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

#88
Hah, yes, I’ve had lots of problems with keyboard layouts. I have a hobby requiring lots of unusual characters (e.g. ɛɔþʔəɬɑʒ), and I haven’t yet found a keyboard layout which allowed me to type all these characters with absolutely no problems. I started off using the Canadian Multilingual Standard [0], which worked well enough, but uses Ctrl rather than AltGr as a modifier, with all the conflicts that entails. Also, some frequent characters such as []/ were hard to get to, and I never did manage to retrain my muscle memory to get used to their positioning. I eventually switched to the Finnish Multilingual layout [1], which fixed the Ctrl problem but not my muscle memory. I think I used Keyman [2] for a while, but I don’t remember it working very well. At the moment, I’m using my own custom keyboard layout [3], which generally seems to work very well… except in Microsoft applications, which seem to inconsistently not recognise dead keys with AltGr. (Excel is a particular offender, which is particularly horrible since I often need to type characters like λση⁻¹ in it.) Not that they’re alone: out of the major GUI libraries I tested recently, only Qt and Electron worked correctly. Clearly, this is an area in need of improvement.

[0] https://en.wikipedia.org/wiki/CSA_keyboard

[1] https://en.wikipedia.org/wiki/AltGr_key#Finnish_multilingual

[2] https://keyman.com/

[3] https://github.com/bradrn/Conkey

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

#89
post #63
post #28

As a kid, I remember being utterly confused, when most games with a console would have the key ` to open it. WTF is the key ` and where is it? For a kid it wasn't that easy to understand that there are such things as different keyboard layouts. Turns out that ` is a single key press to the left of the '1', in English, while it is a bit obscure character to write in other languages. In mine, you have º and ª in that p…

We all suffer from character blindness of some sort. For you: ` - that thing isn't formally defined in English either as far as I know. In English we don't have any diacritics. We do have a few extra symbols, beyond the alphabet for certain situations. Quotations ... " ... meh should be 66 99 and that will be fixed up by DTP software. We use ' to denote a dropped letter - abbreviation. There are a few others. I won't…

ASCII has a limited number of characters, so they designed it so some do double-duty. The grave could be a grace accent if you backspaced over a letter, or it could be an opening quote mark. The apostrophe was the reverse: it could be the acute accent. The fonts were drawn so these characters were angled enough to be accents, but also looked like quote marks. The apostrophe wasn't a vertical prime sign. Angle brackets and greater/lesser-than also double-up.
Post reply on HN