Hacker News new | ask | show | jobs
by dlitvakb 4858 days ago
Most programmers often write their programs in english anyway, to be easy to share or to review by others (even in closed source software), so it makes sense for programming languages to mostly care about English keyboard layouts.

Anyways, if the keyboard layout is a blocking problem for you, consider changing it to what it suits you the best, or use multiple layouts for different tasks. Every operating system has a keystroke to swap layouts.

3 comments

It's not about writing english per se. How often do you need to write {[]}<> in a letter?

Those keys are really easy on US layout but horrible to type on a german keyboard layout. Holding alt-gr and press 7 or 8 or 9 or 0 is surely not impossible to type but compared to US layout it's much more worse, imo.

Fortunately Python does away with the overabundance of curly braces at least.

Why is Alt+9/0 so much worse than Shift+[/]

slightly worse I'll grant, but MUCH worse?

It's AltGr, which is on the right side. And that makes it quite awkward to use. I either break half my hand or need both hands. Or resort to Ctrl+Alt on the left side which isn't optimal either ...
Wow.. now i'm wondering how quickly (if ever) i can adopt to using ctrl+alt instead of that awkward (and hated) AltGr. You never stop learning...
Couldn't you remap your keys so normal (left) Alt is AltGr and right Alt is "normal" Alt? Alt key bindings are pretty rare.
They are? Every time I want to access a menu or a control in a dialog by keyboard I need Alt. Also in Far Alt+typing searches which I use frequently to get around the file system. Sure, one could get used to doing that with the other hand, but at least for me it's not that little muscle memory that has to be retrained.
It's AltGr+7/0 though (on german and swedish layouts at least), which is much worse. Open curly brace is a killer if you are doing it with one hand only. Also the AltGr button is only represented on the right side of the keyboard while you get the Shift on both sides, which makes it more awkward to use with two hands in some situations.

edit: Wow, just learned that Ctrl+Alt is the same as AltGr from the comment below. I've only used computers daily for 21 years ...

Slightly times a lifetime.
I write software in English, sure, but my keyboard layout needs to be Danish in order for me to write emails, etc. in Danish. Having to swap keyboard layouts would mean I'd be confused constantly.

On a Danish Mac keyboard the curly braces are written by holding down Alt + Shift + 8. Not exactly an easy combination to hit.

> Most programmers often write their programs in english anyway

I'm not so sure about that. There are tons of places where English proficiency is really low, even among programmers.

I write norwegian on a US MacBook just fine. All the weird characters are available by pressing the Option key.

When I first got the laptop I switched layouts between coding and writing mails, but after a while I found that learning the key combos for a few letters was easier for me than switching between completely different layouts.

it is one thing write programs in english , i have a french keyboard , typing english is fine , the problem is all the non word stuff that are not directly visible on my keyboard like {}[]|\] and so on. You kind of get used to it but frankly i dream of a language with non of these characters, just words. typing def/end doesnt bother me. By the way , that's kind of why i love coffee-script so much.

    myObject = 
       param1 : foo
       param2 : bar
       param3 : baz

    foo bar,baz,boom
my god it is a relief on a non english keyboard... on the mac i get the @attr without using alt-right , that is neat.