I’ve used a US-QWERTY keyboard layout my entire life. I’ve seen other layouts that do things like reduce the size of the enter/backspace keys, move the pipe operator (|) and can’t wrap my head around how I would code on those.

What are your experiences? Are there any layouts that you prefer for coding over US English? Are there any symbols that you have a hard time reaching ($ for example)?

84 points

Never used a US keyboard in my life. Why would you think US keyboard is the norm?

permalink
report
reply
-3 points

Always used it. You have instant semicolon instead of Ä, which you don’t use when coding, and brackets and curlies are a breeze, the comfort is well worth it

permalink
report
parent
reply
1 point
*

That comfort exists on other keyboards as well

There are like thousands of different keyboard layouts, and you can be certain there will be one that is more comfortable than the US for programming.

Colemak is considered the best for programming.

permalink
report
parent
reply
-21 points

You’re on /c/programming.

Also, it’s even ISO standardized, so yeah, it’s an international norm.

Pragmatically: most programming languages are developed in a way to that it’s easy to type them up on a standard us layout. As English only has 26 letters, which is less than any other language using the latin alphabet (don’t even start me on languages with accents like ñ or that differentiate between à, a, á, and â), all the special characters are usually easily accessible. Most others layouts will tuck them away behind non-trivial combinations in favor of improving accessibility of extra letters and special characters. Cuz essentially in human language you barely need * and [. So, I guess, right ctrl + left shift + 9 will do? how do you feel about coding in python on that. Or on a keyboard where the space for your | has been allocated to some letter ø and your OR operator has been moved to the numpad.

permalink
report
parent
reply
24 points
*

You’re on /c/programming.

Could just as well have been a writing prompt community. It’s just writing ANSI characters for the most part.

Also, it’s even ISO standardized, so yeah, it’s an international norm.

I’d wish something being ISO meant it’s the norm, but that’s just not the case. #ISO8601Gang

Pragmatically: most programming languages are developed in a way to that it’s easy to type them up on a standard us layout. As English only has 26 letters, which is less than any other language using the latin alphabet (don’t even start me on languages with accents like ñ or that differentiate between à, a, á, and â), all the special characters are usually easily accessible. Most others layouts will tuck them away behind non-trivial combinations in favor of improving accessibility of extra letters and special characters. Cuz essentially in human language you barely need * and [. So, I guess, right ctrl + left shift + 9 will do? how do you feel about coding in python on that. Or on a keyboard where the space for your | has been allocated to some letter ø and your OR operator has been moved to the numpad.

As a user of a keyboard layout with æ, ø, å, who also uses python daily, I can promise you that there are zero issues with it.

Most people will grow up with a keyboard layout designed for their native language’s need. If it uses Latin characters, there should be minimal issues using it for programming too.

permalink
report
parent
reply
-7 points

I just explained what the issues are. Programming languages heavily rely on special symbols.

If you haven’t watched yourself from the outside, how do you know “there are zero issues with it”? You might be constantly breaking the typing flow and need to use a two-hand combo for some mundane []. While someone on a US layout never needs to lift their hands of the keys, because all they need is a ctrl with a pinky + right hand within reach.

When I learn a new language, I also learn a keyboard layout for it. Or do you also write in Spanish on your keyboard? How do you make an à and an á?

Ah, that’s right, you speak two languages, you’re stuck using your comfort zone layout, and you’d ofc argue “zero issues”.

permalink
report
parent
reply
16 points

There’s lots of programmers on languages that need more keys readily than us keyboard has. Äöüß, just to give an example.

I don’t know, every time I read a post like this I’m kinda speechless. I know lots of Americans and many of them are brillant and open-minded, but then there are posts like this which are completely oblivious that there are reasons for other keyboard layouts.

The reason OP can’t fathom programming on those is that they aren’t used to it. If you grew up with non-us layouts you similarly couldn’t fathom programming on the us layout.

Sometimes I feel like people refuse to even think about acknowledging that there are other experiences than their own. Go out, try out new things, exercise your brain and callenge yourself.

permalink
report
parent
reply
-4 points

I’m not American, I speak a few European languages, I can type on a multitude of layouts. They all suck for programming, I know firsr-hand. And watching those people who “grew up with a layout” to use two hands for a ctrl+z is both hilarious and painful.

permalink
report
parent
reply
6 points

Also, it’s even ISO standardized, so yeah, it’s an international norm.

Are not all national layouts standardized?

permalink
report
parent
reply
5 points
*

it’s even ISO standardized

Not only are there other ones that are also ISO standards when it comes to software layouts, but funny enough, when it comes to physical layouts, US keyboards normally follow an ANSI standard (not an ISO one), whereas many non-US keyboards typically follow a physical key layout known as “ISO Keyboard”, so one could argue those are more of an “ISO” standard.

https://upload.wikimedia.org/wikipedia/commons/b/b2/Physical_keyboard_layouts_comparison_ANSI_ISO_KS_ABNT_JIS.png

right ctrl + left shift + 9 will do?

No keyboard layout uses ctrl like that… in fact, I don’t think you ever really need to press more than one modifier in any standard non-US keyboard. Unless you have a very advanced custom layout with fancy extra glyphs… but definitelly not for the typical programming symbols.

ISO keyboards actually have one more key and one more modifier (“AltGr”, which is different from “Alt”) than the ANSI keyboards.

In fact, depending on the symbol it might be easier in some cases. No need to press “shift” or anything for a # or a + in a German QWERTZ keyboard, unlike in the US one. Though of course for some other ones (like = or \) you might need to press 1 modifier… but never more than 1, so it isn’t any harder than doing a ) or a _ in the US layout.

permalink
report
parent
reply
-1 points

Remind me again, how do you get {} or [] on that layout?

permalink
report
parent
reply
3 points

what

permalink
report
parent
reply
48 points

I use the UK layout, because I am British. Why would I use the US layout?

permalink
report
reply
46 points

Average American trying to comprehend that people from other countries exist

permalink
report
parent
reply
0 points

… or just didn’t know UK keyboards were different

permalink
report
parent
reply
17 points

I mean the layout they mentioned is called “US” layout I’m sure they could deduct that there are other country specific ones

permalink
report
parent
reply
4 points
*

US-defaultism has a catch: it sometimes accidentally extends to the Commonwealth. You won’t run into most of the internationalization quirks if all you’re comparing is “British English vs American English”.
[Sidebar: I notice this also when English speakers online assume that their audience at least has a vague idea of what Imperial units are, but while that is true of most native English speakers in the northern hemisphere who use feet and miles colloquially, for ESL audiences it’s almost always incorrect]

I switched from AZERTY to US QWERTY permanently specifically to avoid all the issues of badly internationalized software. Bad default bindings (e.g. common vim operations like { requiring the use of AltGr), but also things like games not working at all or only partially (e.g. the number row being either unbindable, or key hints naively showing as “&” and “é” instead of “1” and “2”). Surprisingly few devs understand the difference between key codes and characters, and lots of indie games straight up don’t even internationalize and require switching layouts (good luck if there is an in-game chat).
After getting into mechanical keyboards, the ANSI US keyboard layout has been useful as well because these are quite common. ISO mechanical keyboards are rarer, and Belgian AZERTY keycaps are borderline nonexistent.

Also in practice I use the qwerty-fr layout which is the US layout with a French layer on AltGr. The kicker? It’s better at writing French than the French AZERTY which is missing a lot of letters (Ç, æ, œ, À, …). AZERTY is a terrible layout but that’s a separate discussion.

Of course the Americans should develop properly internationalized software, but I personally know several fellow Belgians who switched to QWERTY for (some of) the reasons outlined above.

permalink
report
parent
reply
2 points

Fellow Belgian here. I also switched to QWERTY.

permalink
report
parent
reply
44 points

I’m pretty sure most people outside the US do that

permalink
report
reply
38 points

ISO for life.

You can keep your stupid tiny little enter key.

permalink
report
reply
15 points

This!

Oh good I hate that tiny little enter key.

permalink
report
parent
reply
2 points

The enter key I got used to on an ANSI keyboard I had for a while but what actually made the bigger difference was the \\/| key being above the enter key at the far right end of the keyboard which is hard to reach with the pinky. Rather important key for being that hard to reach.

permalink
report
parent
reply
0 points
*

No way - the two enter keys are about the same size - yours is just rotated 90 degrees and further away. That’s not an improvement. Even worse though is the tiny left shift key - I can’t get used to that.

With an ANSI keyboard you can comfortably reach the enter and left shift without taking your other fingers off the home row. With ISO you have to move your arm which is particularly bad for the shift key since you might need to press other keys at the same time, but now your hand is in the wrong position.

permalink
report
parent
reply
8 points

On the ISO keyboards I’ve seen, the enter key has way more than double the surface area than ANSI, so it’s definitely not ‘just rotated 90 degrees’. Also these people probably grew up with ISO and struggle with ANSI, just like you probably grew up with ANSI and struggle with ISO.

permalink
report
parent
reply
3 points

hahaha, no.

permalink
report
parent
reply
37 points
*

I prefer a British keyboard layout as that’s where I’ve always lived and that’s what all the computers come with here.

Actually no, Apple fucks it up a bit by having a weird hybrid between US layout and British layout which is pretty infuriating to have to learn (opt+3 for the # character? wtf Apple?), particularly given I switch between PC and Mac daily

permalink
report
reply
-1 points

This drove me up the wall. And, I hate to admit it, but I’ve let Apple win. I use Windoze for work so I’ve swapped @ and " to be the same as Apple UK, and if I run Linux I choose the Apple UK layout as well. It’s just…easier rather than having to reset my muscle memory every day.

permalink
report
parent
reply
8 points

Ahh, I can’t make that change I’ve used windows and Linux for many more years than I have Macs, the Mac way will always be the one that feels wrong to me!

Basically means I inevitably have to do the "@£`# dance a couple times a day

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 2.4K

    Monthly active users

  • 1.8K

    Posts

  • 28K

    Comments