Earlier quoted context omitted.
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…
I think back in the day (typewriters thru... 90s?) you wrote quoted text `like this.'
Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
91–100 of 212 posts
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#92Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#93Earlier quoted context omitted.
> What is it? Not sure if you meant this literally, but I've seen it refered to as a back tick. As to what it's for, I have no idea either. I can't recall ever seeing it outside of programming.
On a mechanical typewriter you'd have a button that would "revert" the position you'll write to by one character - also known as backspace. So if you pressed backspace followed by "`", you'd give the last character a grave accent. That's my theory for it being called back tick anyways. Nowadays you could configure your input method to make that key give the next character a grave accent
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#94The root of the problem is what this article correctly describes as the deprecated properties `keyCode` et al. These are essential raw Windows events that browsers in the '90s unwisely decided to expose. For any platform that is not Windows, these have to be emulated, which is not at all simple, since the details vary according to particular Windows keyboard layouts.
It's not a windows thing. These are the codes that the hardware uses, on all platforms.
For instance, consider ‘/’ (beside right shift). The normal hardware code (USB HID) is page 7 usage 0x38 (sometimes written 0x070038; in theory HID usage codes can exceed 16 bits, but in practice they don't). The PS/2 hardware code (for old keyboards) is 0x4A. The Windows ‘scan code’ is 0x35. And finally, the browser legacy ‘keyCode’ which you can see at https://w3c.github.io/uievents/tools/key-event-viewer.html is 191 (0xBF), which is the Windows virtual key ‘VK_OEM_2’.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#95It's not just international keyboards that are affected by this. I'm a Dvorak user so I run into these issues from time to time. As the article explains, there is a difference between the physical keyCode and character it corresponds to. Which to use really depends on what it is being used for, and there are situations for both. The article suggests checking the character typed, but this is not always the correct way…
If you're using `keyCode` for anything, you're doing it wrong. There's a reason it's marked ‘legacy’.
Physical key position is the UI Event ‘code’, which is in this example will be "KeyW" regardless of layout. This field is essentially 1:1 with hardware HID codes (as used by USB and Bluetooth keyboards).
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#96And Alt+S already opens the browser's History menu, on Firefox, and I'm not sure that applications can override this binding, or if users will appreciate it.
----
Last year, I was working on a Qt app that needed to translate physical scancodes (not layout-dependent character codes) located in a piano layout, into music notes. I developed a library (https://github.com/nyanpasu64/qkeycode/) and submitted several Qt/QtWebEngine bugfixes.
Anyway, fuck KeyboardEvent.keyCode. It differs across OSes and browsers.
Fun fact: On QWERTY, + requires holding Shift. Some apps (Qt Creator, QtWebEngine) don't zoom in upon Ctrl-=, but only Ctrl-Shift-+. IIRC Firefox in English locales binds both Ctrl-+ and Ctrl-= to "zoom in"
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#97It's not just international keyboards that are affected by this. I'm a Dvorak user so I run into these issues from time to time. As the article explains, there is a difference between the physical keyCode and character it corresponds to. Which to use really depends on what it is being used for, and there are situations for both. The article suggests checking the character typed, but this is not always the correct way…
> For instance, the most annoying are games which default to WASD based on the letter typed and not the physical keys Is it even possible to do anything else? I can’t imagine keyboards report their physical layout..
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#98I'm french canadian and the most satisfying solution I've found is to keep switching from one keyboard layout to another. I mostly use the american layout when I code, and the french canadian one to communicate. I got used to it in about a week.
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#99Earlier quoted context omitted.
I think the answer is that their engineers overwhelmingly use the English layout keyboards and work in Cupertino. Most improvements to coding on a Mac I have seen have a design-for-self element where apple employees are eating their own dog food and want to improve the taste.
C was famously designed in Murray Hill on a system with Teletype 37s, which featured then-fairly-novel { and } keys (as it so happens, the shifted versions of [ and ]).
Re: Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
#100For 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…