16 ms·
Why keyboard shortcuts don't work on non-US layouts and how devs could fix it
- joshuakarl 5y agoI'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.
- stkdump 5y agoI now exclusively use US-International No Dead Keys. I just use the right alt key + qpys to get äöüß. I hate having to switch layouts and switching layouts accidentally while typing. Those key combinations are not worse than []{}\ on the german layout.
- layer8 5y agoI use a US keyboard with Caps Lock mapped to Compose (using WinCompose [0]), which lets me type any Unicode character I need. Totally agree that switching layouts is a pain. [0] https://github.com/samhocevar/wincompose https://github.com/samhocevar/wincompose
- hnjst 5y agoNot sure it's comforting but after exposure to french and swiss keyboard layouts, the canadian one is for me a sweet spot. It's "almost standard qwerty" while allowing to write in french properly. "US International with dead keys" is workable but somehow weirder and less consistent between OSX and Linux.
- 908B64B197 5y agoLooking at that layout, it's almost US-ANSI. Doesn't look so bad for programming.
- gmac 5y agoIt 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).
- deleted 5y ago[deleted]
- lxgr 5y agoIt‘s even worse on ISO keyboards (the ones with the large return key). There‘s a physically different key arrangement on these, so even when switching to the US lay-out, some important system-wide shortcuts are still impossible to type (most notably the one for „switch to different window“).
- jurip 5y agoYeah Apple doesn't seem to even try to cater to non-US users with their shortcuts. That's the first I've heard of a system-wide back shortcut. You can't type that in my layout. The default switch between windows of a single app shortcut is also impossible, IIRC. One that I always have to reconfigure when I switch editors is the line comment shortcut which defaults usually to something like cmd-/. I wonder if it's any better on iOS or are you just completely out of luck there when you can't reconfigure the shortcuts?
- Pinus 5y agoOne favourite of mine in this genre is applications who use both command-[ and option-command-[. On a Swedish mac keyboard, [ is on option-8, so it is impossible to type just command-[ without the option key...
- sleavey 5y ago> 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.
- young_unixer 5y agoI'm Chilean and I use the ANSI US layout because /, < and > 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.
- Svip 5y agoWhy not just use US Intl, and use ALT GR to produce á, é, í, ó, ú and ñ, along with æ, ø and å? I have a strange ISO/ANSI US keyboard, with an ANSI left shift and an ISO enter key.
- young_unixer 5y agoI didn't know about the US intl layout when I decided to make the switch, and I don't know if it's worth to learn it now.
- Svip 5y agoI used to switch between US and DK layouts, it's just so much easier to just have one layout. In my opinion, learning US Intl is worth it. Besides, it's pretty predictable for Spanish characters: á = altgr+a, é = altgr+e and so on.
- type0 5y agoYeah it's great for Spanish. But I found that knowing (and using) native layout is more valuable to me because when I need to type on someone else's keyboard I'm not lost and can still touch type. If you never need to do this US international is indeed superior layout. Trying to remember more than two layouts becomes confusing very fast. AZERTY and QWERZ are the two worst ones, fortunately I never need to use those.
- zigzag312 5y agoDead 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.
- pornel 5y agoPolish 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.
- type0 5y agoI wish more languages would adopt this.
- kawsper 5y agoI have done the same, on my work laptop I specifically asked for it to come with US layout.
- corty 5y agoThe fix is to buy US keyboards and configure a compose key for non-a-z characters.
- MattGaiser 5y ago> 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.
- tkainrad 5y agoI agree to some extent. However, I have outlined a few very simple approaches. At the very least, developers could stop using special characters for their most important shortcut bindings.
- smnrchrds 5y agoFor a 10-person startup, that's fair. For a company like Google , with offices in Germany and France and hundreds of engineers from any nationality, not so much. Other companies fall somewhere in between based on their headcount and global reach.
- jameshart 5y agoBig companies aren’t huge for the sake of being huge. They employ so many people because they have so much work to do. They still employ as few people as they can get away with.
- spicybright 5y agoPlus it's all about profit margins. Investing in tons of testing for not enough return from users means they just won't do that. I'd imagine you'd need multi-lingual testers to use the product too, not just a native speaker given a foreign keyboard. There's no way to find bugs an average user would face with normal use.
- adamzochowski 5y agoThere 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, "right-alt"+"s" is reported as "alt"+"control"+"s", which triggers crappy "control"+"s" checks. Similar scenarios happen many places that check for 'alt'+'letter' without checking if control also is not pressed. Microsoft thread for team user voice issues on this https://microsoftteams.uservoice.com/forums/555103-public/suggestions/32265802-alt-a-and-alt-s-affecting-polish-character-for-%C4%85 https://microsoftteams.uservoice.com/forums/555103-public/su... or Medium's developer talking about 'ś' and 'ctrl'+'s'. https://medium.engineering/the-curious-case-of-disappearing-polish-s-fa398313d4df?gi=56e8f39b530e https://medium.engineering/the-curious-case-of-disappearing-...
- toxik 5y agoSeems easy to fix > Windows for backwards compatibility reports 'right-alt' as 'alt+control'. There’s your problem, right there
- samatman 5y agoNo, there are at least two problems here. An application shouldn't accept ctrl+alt+n as either ctrl+n or alt+n. That is simply a bug, no way around it.
- toxik 5y agoIt's hardly a bug, just a bad interaction. I would argue that the bug is implicitly pressing Control. Control is not a layer modifier.
- adamzochowski 5y agoThe backwards compatibility is for physical keyboards. So that a keyboard with just one alt can still trigger polish letters. I don't know how other OSes allow for users to trigger "right-alt" when the keyboard has only one alt character.
- Joeri 5y agoOn a tangent, why are non-qwerty keyboards so poorly designed for programming? And specifically, why is apple’s azerty layout so terrible? Just look at this image: https://i.stack.imgur.com/3LL8a.png https://i.stack.imgur.com/3LL8a.png Can you find the [ and ] keys? If you’re having trouble, it’s because you have to use 2 (two!) modifier keys and activate the ( or ) keys, which themselves are clumsily placed. This cannot be typed one-handed in a comfortable way. Apple’s azerty layout is unique in this, as regular azerty puts those keys in a more sensible place. I keep wondering: why does apple make me do a Vulcan nerve pinch every time I want to index an array?
- mattnewton 5y agoI 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.
- tesseract 5y agoC 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 ]).
- kps 5y ago‘Happens’ is understating it. ‘[’ is ASCII 0x5B and ‘{’ is ASCII 0x7B, and the Teletype 37 was entirely electromechanical. For those unfamiliar, see https://en.wikipedia.org/wiki/Bit-paired_keyboard https://en.wikipedia.org/wiki/Bit-paired_keyboard
- rmetzler 5y agoIt'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
- Havoc 5y agoAlso while we're at it...fix this for bitlocker. Makes special characters in passwords a nightmare and you need to memorize where that stupid character is...
- numpad0 5y agoIt’s unwise anyway to use letters outside of a-Z0-9 in a password unless absolutely necessary
- a1369209993 5y agoIt's also unwise to use a password, when you should be using a passphrase[0]. See eg https://www.explainxkcd.com/wiki/index.php/936 https://www.explainxkcd.com/wiki/index.php/936. Edit: 0: or at least a pass-multiple-words, depending on how picky your definition of "phrase" is about grammer. It shouldn't be "word", singular, is the point.
- kps 5y agoThe 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.
- stkdump 5y agoIt's not a windows thing. These are the codes that the hardware uses, on all platforms.
- kps 5y agoNope. They're Windows ‘virtual key codes’, which are entirely unrelated to Windows ‘scan codes’, which are also not hardware codes (but are distantly descended from the original IBM PC). 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 https://w3c.github.io/uievents/tools/key-event-viewer.html is 191 (0xBF), which is the Windows virtual key ‘VK_OEM_2’.
- stkdump 5y agoThanks for the info, I wasn't aware. I thought it was all 'scancodes'
- j1elo 5y agoAs 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 place... so no ` at sight. But game devs assume that ` is just a keypress away in a confortable area of the keyboard, and it became the de facto way to open in-game consoles. Oh well.
- Macha 5y agoAlso programming languages used it as an alias for exec. Even if you have a ` key, on some layouts (such as the Irish keyboard layout) it can be a weird key to type due to dead key behaviour, often requiring multiple presses to respond and eating the next keypress.
- johannboehme 5y agoyeah.. i never use js template strings because of that frigging unusable backtick character. Ist so hard to type on my layout, that its just not worth it -_-
- gerdesj 5y agoWe 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 dwell on "thorne" and ligatures and other oddities. I do not know of any reason to write ` - it is not an apostrophe, which is: '. What is it?
- remexre 5y agoI think back in the day (typewriters thru... 90s?) you wrote quoted text `like this.'
- PureParadigm 5y agoIt'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 to do it. For instance, the most annoying are games which default to WASD based on the letter typed and not the physical keys (I've seen this both in web app and native games). Using WASD based on letters simply does not make sense because the whole purpose is to mimic arrow keys. If you base it off of letters typed, then on Dvorak it's like if you used ,A;H on Qwerty which makes absolutely no sense for directional navigation. For shortcuts where the letter has a meaning, then you might want to look at the actual character. But beware that even alphanumeric keys are not always in the same place because of layouts such as Dvorak and Colemak.
- setr 5y ago> 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..
- powersnail 5y agoThe only possibility is to allow the user to assign custom keys, which is pretty common. It’s impossible to know the physical layout for absolute certainty. For all you know, my “Enter” could be a pedal under the desk.
- db48x 5y agoIn X11 with the Xkb extension you can configure simplified vector drawings of your input devices, which any application can query. It is intended that applications use these drawings in their help systems and tutorials, as well as in their key binding editors. Few applications bother though. https://www.x.org/releases/current/doc/libX11/XKB/xkblib.html#Keyboard_Geometry https://www.x.org/releases/current/doc/libX11/XKB/xkblib.htm...
- rcarmo 5y agoI’ve gotten so used to switching between keyboard layouts when moving from e-mail to coding that I don’t think about this much, but it can be tremendously irritating when I’m on a new machine or just forget to switch. (pt-PT keyboard, parenthesis and brackets are either an off-by-one or require Alt-Gr+Shift to type.) Using a US keyboard layout for a while really drives home how much it influenced popular CLI character choices (like path separators, pipe characters, etc.), too.
- vxNsr 5y agoThe author spends a lot of time explaining the APIs that have been deprecated but doesn’t say which one is the correct one to use now...
- city41 5y agoThey do briefly mention it, `key` https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEve...
- tkainrad 5y agoUnfortunately, it's not that simple. For different apps, different approaches might be best. That's why there is a section on possible solutions. Regarding events, attributes, and deprecation: keydown (event), code (attribute), and key (attribute) are not deprecated.
- wodenokoto 5y agoIn order to write backtick, I have to shift-click the key left to backspace and then click spacebar. Tilde ~ is similar: option-click and then space. This makes the out-of-the-box keyboard shortcut for switching window on macOS unreachable on my macbook pro. There are several default shortcuts on osx that are unreachable from international keyboards.
- kolinko 5y agoPerhaps you can remap tilde to some other key on the keyboard?
- 6t6t6t6 5y agoThat's why I switched to American keyboard some time ago.
- ncpa-cpl 5y agoSame here. I use US International, which allows me to type the languages I speak. I even buy all my computers with US Keyboard layouts because I like when my keys match the OS configuration.
- dgan 5y agoI am using a French azerty keyboard, but since '[]' and '{}' are in wierd locations,i always remap them to US-alike. This breaks the diacritics, but oh well I also like my ';' and '.' swapped, because dot is clearly more useful when typing in terminal
- huachimingo 5y agoAnd then you discover non-ASCII world...
- de6u99er 5y agoI use an English keyboard for development.
- inDigiNeous 5y agoYeah I do the same, for these same reasons. It's just so much faster to type [] {} and so on vs the Finnish layout.
- rodelrod 5y agoFor 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 still use.
- toyg 5y agoIt 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”.
- rodelrod 5y agoI believe you are talking about a different layout, "US International with dead keys". I'm talking about "AltGr dead keys", in which the quotes are available directly and the accents are entered using e.g. AltGr-'. It's not available out of the box in Windows but you can easily find ready to install layouts online.
- hnjst 5y agoI don't know which language you're using but for french I migrated from "US International with dead keys" to "canadian english". I fill that, among other things, simple quotes are easier to type and consistency between OSX and Linux is better. A matter of habits and workload balance I guess.
- rodelrod 5y agoYou are talking about a different layout, which I also dislike. I'm talking about "AltGr dead keys", in which the quotes are available directly and the accents are entered using e.g. AltGr-'. I'm using 6 european languages occasionally, of which 3 every day, including French. Of these, Canadian English would be only useful for French (e.g. it does not have a tilde dead key AFAIK) and is still different enough from US to be annoying for programming (e.g. the angle brackets are in the "wrong place"). Certainly a big upgrade from AZERTY though! EDIT: My remark on the Canadian English layout above is based on the first layout that showed up when I googled it, but now I noticed that a lot of different variants come up in the search and I don't know which one you're using. In any event, they all seem to be weaker either for programming or for non-FR/EN languages or both.
- deleted 5y ago[deleted]
- bradrn 5y agoHah, 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 https://en.wikipedia.org/wiki/CSA_keyboard [1] https://en.wikipedia.org/wiki/AltGr_key#Finnish_multilingual https://en.wikipedia.org/wiki/AltGr_key#Finnish_multilingual [2] https://keyman.com/ https://keyman.com/ [3] https://github.com/bradrn/Conkey https://github.com/bradrn/Conkey
- thomastjeffery 5y agoThe best solution would be to actually allow users to change the keyboard shortcuts on the software they use.
- tkainrad 5y agoAbsolutely, that would be a fine solution. It is also mentioned in the article. I really don't know why web application developers are not doing it. Especially when you could be the first to do it and have a real edge over your competitors.
- martin_henk 5y agoMost prominent for me: ctrl+z on a german keyboard. You have to stretch your hand a lot.
- nyanpasu64 5y ago> For example if you have / as you shortcut for focusing the search field because your US users are accustomed to this behavior, just add alt+s as an alternative for international users. And 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/ 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"
- spicybright 5y agoUhg, the keyboard zoom shortcut drives me bonkers sometimes. Most apps can't seem to make up their mind, or be bothered to implement both.
- sparkling 5y agoOne of many reasons i switched from a Euro ISO layout to a QWERTY ANSI layout a while ago. It took me about 3 weeks to get comfortable with QWERTY ANSI, plus another 2 months to fully get back to my regular typing speed. 100% worth it tho if you need a bunch of special characters as you regularly do with most programming languages. Some tips: - switch out ALL you keyboards, at home, at work, on all devices - use EurKey* for reaching special keys in your language (french, german, whatever...) * https://eurkey.steffen.bruentjen.eu https://eurkey.steffen.bruentjen.eu
- trinix912 5y agoWhat kind of bothers me is that while many accented letters are available just by pressing AltGr/ShiftAltGr/etc, common Slavic ones (č, š, ž...) aren't. You have to use dead keys to type them, which defeats the purpose. You can already type them in a similar way on macOS by just holding down the original letter on a Mac Canadian/Australian/EngIntl layout, but that's a pain for pretty much anyone who types a lot. These letters are used often enough to have their own keys on many localized keyboard layouts.
- whyoh 5y agoYou can use other software to remap the keys to your liking, for example MSKLC on Windows.
- beefield 5y agoHow did you cope with the horizontal enter key? That is the single most unpleasant thing whenever forced on ANSI. (I'm not a touch typist)
- whyoh 5y agoI also switched to ANSI (with a custom software layout) after using ISO for most of my life. I prefer the wider/horizontal Enter key on ANSI. I'd sometimes accidentally hit the key above it (\), but over time it got better and now it's not a problem anymore.
- greggman3 5y agoTL;DR. Don't use keypress, it's deprecated. Don't use 'keyCode', 'which', 'char' which are all deprecated. Do use 'key' Another issue I run into is forms that dismiss via keydown and escape. I type in Japanese which means I'm using an IME. An IME, or at least the Japanese IME, you type characters and they appear with possible completions. They haven't actually been given to the app yet. Pressing Escape cancels the completions. But webpages that cancel some model form dialog via escape means that if I press ESC to cancel IME completion (which is common) I also cancel the dialog and lose all input had previously entered into the form. I'd think this would been solved at the browser level, if the IME is active then don't pass keys to the app but for probably valid reasons that's not what happens. TL;DR don't use escape to cancel a model form! edit: apparently there's the 'isComposting' property on the KeyboardEvent to find out if the user is currently using the IME https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEve...
- Vinnl 5y agoThanks, going to add that to a modal today.
- tkainrad 5y agoNot sure if I agree with this summary of my article. For most web apps with relatively few keyboard shortcuts, I would actually recommend to use keypress. keyCode/which/charCode work when used with keypress. The article mentions an open-source example that does it this way and works fine on international layouts: Discourse
- greggman3 5y agoWell, maybe you should go edit MDN because it has a giant red "DEPRECATED" at the top of keypress https://developer.mozilla.org/en-US/docs/Web/API/Document/keypress_event https://developer.mozilla.org/en-US/docs/Web/API/Document/ke...
- tkainrad 5y agoNever said it wasn't deprecated. It still works much better than using keydown with keycode. For most apps and layouts, it's a sufficient solution.
- haolez 5y agoThis is one thing that bothers me in Emacs. The shortcuts are not consistent between modes. It's a lot of mental overhead if you go with a config close to the defaults.
- wdb 5y ago> Some US users might welcome this change as well, because alt+s can be typed with just the left hand while / reqiures people to take their hand of the mouse Only an issue when your mouse on the right side of the keyboard
- dejj 5y agoThey had me until: > This means when the key combination is alt+/, the shortcut should be triggered when a german layout user presses alt+shift+7. No way. I want to press alt+dash, which is in the same place as alt+/ on a US keyboard. Pressing alt+shift+7 is the equivalent of Lee-Harvey-Oswald-grade marksmanship on a keyboard.
- tkainrad 5y agoThe problem is, most people will not know that alt+dash is an alternative for alt+/ with their layout. Also, it does not actually work with all browsers and operating systems. Try to use dash as a replacement for / in Firefox and you will be disappointed. However, developers defining and documenting alt+/ as an alternative for alt+/ when registering the binding would indeed be a fine solution.
- gwenzek 5y agoHonestly don't wait on all the web Dev to fix their app. Buy yourself a programmable keyboard that tells the computer they are a "normal US layout keyboard". Now when you press "shift+7" on your keyboard it only sends "regular US keycode for /" As a benefit you'll maybe also realize that Azerty or Qwertz are pretty bad layout for typing French/German, and you'll come up with something better.
- account42 5y agoIf you do that you'll break anything that maps based on scancodes in order to have a consisten physical locations while the key label does not matter, like games with WASD for movement and nearby keys for shortcuts.
- diffeomorphism 5y agoSo what to do about mnemonics? What about keyboard placement? > This means when the key combination is alt+/, the shortcut should be triggered when a german layout user presses alt+shift+7. Really? The / is conveniently accessible on a US layout; shift+7 isn't. So this gains you the benefit that you don't have to change documentation (it is "/" however you type it), but much less usable on other layouts. Alternatively, you could try to use the key in the same physical position, but - is already used for other shortcuts due to its meaning.
- rock_artist 5y agoThis article looks at non-US but missed non-Latin where things gets worse. Arabic, Chinese, Hebrew, Russian among others. When set to different layout many apps ignore common actions like Cmd/Ctrl + C and you need to make sure you're using a latin layout.
- tincholio 5y agoI mostly write in English (plus Clojure, shell, and C#), but often also in Spanish, French and Finnish. I've found that a standard QWERTY/US layout with a Compose key is the best option. It gives you a decent layout for coding and shell related characters, and all diacritics (and plenty more) are a 3 keystroke chain away (with no chording). Even when writing French, which requires a lot of accents, I find it more fluid than needing to switch to (the completely awful) AZERTY layout.
- aloisdg 5y agoI like to use the qwerty US international. Far better than the Azerty layout which is indeed completely awful.
- TazeTSchnitzel 5y agoI like the default Mac US/International English/British layouts (they're almost the same as each other). Mac users are graced by an OS that actually uses the Option (Alt) key on every letter to do something useful. You can type all manner of diacritics and such without using a non-standard layout! It works great for English, German, Swedish, Spanish, French, and perhaps more. I only wish there was good support for it on Linux and Windows. I will eventually contribute a patch to xkb to fix its version of this.
- tincholio 5y agoI'm no longer using Macs for work, but while the option key does enable useful stuff, you can do even better with Karabiner elements and a Compose key there as well :)
- Gehinnn 5y agoKeyCombiner looks very interesting. I once worked on a keyboard visualizer for vscode (https://hediet.github.io/visual-keyboard https://hediet.github.io/visual-keyboard), but I was never really happy with it. It would be nice if keyboard shortcuts were a matter of the OS and applications would expose a list of all available commands with default shortcuts...
- michaelgrafl 5y agoThat's why I switched from a German QWERTZ layout to US International. Don't like the dead keys, but the shortcut confusion is worse.
- fpoling 5y agoAnother problem on international keyboards besides unexpected key-codes for symbols is that it is awkward to type them with extra AktGr or Shift. Even with Vi-based editors this an awkward problem. So indeed avoid symbols. If the application needs more shortcuts, then use prefix keys for less frequently used shortcuts or allow the user to type commands.
- dijit 5y agoI gave up and just ran ANSI. (I'm from the UK, so I only really lose the British currency symbol)
- type0 5y agoUK layout always trips me up, It's so similar but yet it's not the same as more sane US one.
- jakub_g 5y agoMy favorite recent WTF: On French keyboard, the numbers 0-9 and special chars (#$&@...) are swapped, so you need "shift+<num>" to type in a number. Effect on the web compat: A phone number validator on French lowcost railway website was built/tested with French keyboard only; they were checking input codes in JS on each keypress and only allowing the presses of certain keys with shift enabled. Since you can't type a number on QWERTY with shift enabled, I was unable to complete the form until I realized what's up by reading the JS and switched to AZERTY layout. (copy-pasting into the input didn't work either) --- Unrelated aside: as I was raised in Poland which is based on US QWERTY and all programs using US shortcuts (with the only quirk being AltGr mentioned in other comments), I was mind blown than in other countries it's customary to localize shortcuts. For example in Spain in notepad.exe, save is not CTRL-S but CTRL-G ("guardar"). In France, you don't bold in Excel with CTRL-B, you bold with CTRL-G ("grossir"). For some reason Excel online only lets me use the FR version despite settungs all possible locale settings to en and this drives me nuts.
- aethertron 5y ago"Do you use an international keyboard layout?" No, I use a national (UK) one.
- baxuz 5y agoI actually made a custom MacOS Croatian keyboard layout to work around these issues. It switches to a US layout if ctrl/lalt/cmd are pressed, including switching `Z` and `Y`: https://github.com/ivancuric/mac-hr-sane-layout https://github.com/ivancuric/mac-hr-sane-layout MacOS is notoriously bad for handling international shortcuts. Eg, `Cmd+[` is back system-wide. To get [ on my keyboard I need to press `AltGr + F`. `Cmd + AltGr + F` doesn't work, of course. Where the `[` character is on a US keyboard, I have `Š`. `Cmd + Š` also doesn't work. Manually recording a shortcut to rebind it to `Cmd + Š` also used to output `Cmd + Ctrl + Alt + F`, which seems to be fixed at some point in the last 3 years.
- heisenbit 5y agoI raise you to MacOS + browser + Citrix + Linux + Other browser with Linux being a farm with different keyboard configurations so you never know what you face when you try to log in (requiring the '@' sign).
- nloa 5y agoSlack, please read this. Thank you.