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)?

  • @UndercoverUlrikHD
    link
    845 months ago

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

    • @[email protected]
      link
      fedilink
      -24 months ago

      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

      • @[email protected]
        link
        fedilink
        1
        edit-2
        4 months ago

        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.

    • @[email protected]
      link
      fedilink
      -215 months ago

      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.

      • @UndercoverUlrikHD
        link
        24
        edit-2
        5 months ago

        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.

        • @[email protected]
          link
          fedilink
          -74 months ago

          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”.

          • @UndercoverUlrikHD
            link
            44 months ago

            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 [].

            Because I don’t have the issue you’re projecting. And if someone do have that issue, what type of programmer (assuming no physical disabilities) has their productivity limited by their typing speed? No one would be my guess.

            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.

            Cool, same here , just that sometimes we press alt gr instead of ctrl.

            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 á?

            ctrl + \ and then a for à and alt gr + \ then a for á. It’s really not much of a hurdle. And definitely faster than trying to learn a new keyboard layout that I can’t type on without looking.

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

            Are we talking actual languages or programming languages? Either case, you assumption is wrong. I don’t understand where all your antagonistic energy is coming from. It’s just a keyboard layout, there isn’t a single correct one. Just use what you’re used to and that you can write with a good flow, which for most people will be the layout they grew up with and can type in the blind with.

      • @Avalokitesha
        link
        164 months ago

        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.

        • @[email protected]
          link
          fedilink
          -44 months ago

          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.

          • @Avalokitesha
            link
            34 months ago

            Wtf, who needs two hands for that? Do they have children’s hands?

            It’s all a matter of habit - for me all layouts but my native sucks for anything to do on a keyboard. The only thing that sucks is if keybinds are set to shift-/ because / is already shift-7. I haven’t found a replacement for that yet. Forgot which program used that and for what, but I remember it was a bummer. Still wouldn’t spend all that time and energy and slowdown learning a different layout.

            • @[email protected]
              link
              fedilink
              -64 months ago

              So now we go from “you are so culturally dense” to “I’m unable to learn a different layout”, “what’s wrong with your hands are you a midget”.

              • @Avalokitesha
                link
                34 months ago

                Not culturally dense, but absolutely unwilling to consider cultures outside their bubble other than as mere curiosities for entertainment. I stand by that.

                Not unable to learn a new layout, but unwilling, because I don’t see the point. Why would I waste time and energy on something that will at most bring me one more shortcut to use? Programming is not about typing speed. If the bottleneck for you is typing speed, your job is very different than anything I’ve seen or heard of.

                I have never seen anyone but my computer-illiterate mom use two fingers for ctrl-z, hence I was expressing my bewilderment about that. I’ll probably be able to do that move blind with one hand, and so are all of the people I know who use the computer in a professional setting. The only explanation I had for that was that they have exceptionally small hands so it’s a necessity. If you want to take that as an insult of your hands, be my guest, but I’m done here.

      • @[email protected]
        link
        fedilink
        64 months ago

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

        Are not all national layouts standardized?

      • Ferk
        link
        fedilink
        5
        edit-2
        4 months ago

        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.

          • Ferk
            link
            fedilink
            2
            edit-2
            4 months ago

            Same effort as getting &* and () on a US layout (so, modifier key + 7 8 9 0, respectively), the difference is you press AltGr instead of Shift as the modifier. And i’d argue its actually easier to press AltGr with the thumb than shift with the pinky.

  • JackGreenEarth
    link
    fedilink
    English
    485 months ago

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

    • Big P
      link
      fedilink
      English
      465 months ago

      Average American trying to comprehend that people from other countries exist

        • Big P
          link
          fedilink
          English
          175 months ago

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

          • @[email protected]
            link
            fedilink
            14 months ago

            I’ve seen Tomorrow Never Dies, so I know there are Chinese keyboards.

            The UK speaks English though, so I would have figured a UK keyboard would be at least very similar to a US keyboard, enough so that switching from one to the other wouldn’t be too hard.

            • @[email protected]
              link
              fedilink
              14 months ago

              Every language has a different lay out because they are all based upon the typing machine.

              Which needed a specific layout so the hammers didn’t hit each other during commonly typed letters.

              And yes, British English is a different language than American English. That is why you have things like colour and color.

    • @[email protected]
      link
      fedilink
      4
      edit-2
      4 months ago

      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.

    • Atemu
      link
      fedilink
      24 months ago

      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.

    • @[email protected]
      link
      fedilink
      0
      edit-2
      5 months ago

      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.

      • @SteveTech
        link
        English
        85 months ago

        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.

  • @[email protected]
    link
    fedilink
    37
    edit-2
    5 months ago

    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

    • @[email protected]
      link
      fedilink
      -15 months ago

      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.

      • @[email protected]
        link
        fedilink
        85 months ago

        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

  • ZeldaFreak
    link
    fedilink
    375 months ago

    I program like I learned it? I use my German QWERTZ layout. A lot of keys are different, yes, but I grew up with this layout and I’m used to it. Imagine giving me a US QWERTY layout and I would misstype every time. I even hate it when Windows swtiches my keyboard layout, even though I removed the shortcuts to it and I misstype constantly. Heck even Visual Studio switched my shortcuts and it sucked.

    After some time I realized that (Game) Devs suck, because they forget that other layouts exist. Its not a big deal, but at some point I realized that the Chats on T, Y, U makes much more sense on a QWERTY Layout. Also Markdown with ` kinda sucks. For a codeblock, I need to hold shift and press the key that is left of backspace 3 times and then one space, because when I press it once, nothing happens but pressing it a second time, 2 appear. Pressing space let it appear directly. Or I type 4 and remove one.

    But this it what I’m used to. And if I ever would work outside Germany, I will bring my own QWERTZ keyboard and require them to install the German Keyboard. I don’t need a German UI. I have all programming related software in English, because its easier to google stuff.

    • Atemu
      link
      fedilink
      14 months ago

      I ever would work outside Germany, I will bring my own QWERTZ keyboard and require them to install the German Keyboard.

      The computer doesn’t know which labels are printed onto the key caps. You can type any layout you want, no matter the physical layout.

      • ZeldaFreak
        link
        fedilink
        34 months ago

        Except that there exist multiple physical layouts and then keys can be missing and some keys are shaped different.

  • Lupec
    link
    fedilink
    285 months ago

    A lot of us don’t live in the US to begin with, so I assume a significant portion of us just use whatever the local standard is. That’s where I’ve been at so far, the Brazilian layout is a QWERTY variant so not that different. It does make some things more awkward, but you get used to what you have to work with.

    Brackets and curly braces are less convenient off the top of my head, backticks too. Vim is a tad less ergonomic without some extra fiddling, for instance. In fact, I’ve been considering getting a US keyboard for coding to make that kinda thing less of an issue, US international makes accents and whatnot accessible enough that I think I could make it work.

    • Turun
      link
      fedilink
      5
      edit-2
      5 months ago

      If you’re cheap like me, just change the keyboard layout on the software side and instead of looking at the now incorrect key caps, look at the American keyboard layout image on Wikipedia instead. It doesn’t take long to relearn the few differences. And the parentheses are more ergonomic on the us keyboard layout IMO.

      Edit: compared to the German layout. Brazilian looks ergonomic enough for programming without having to switch.

    • kamenLady.
      link
      fedilink
      35 months ago

      I think the @ being a shift 2 would confuse me the most in the beginning, before getting used to it.

      I’m a Brazilian web developer living in Germany for 32 years and actually never used a Brazilian keyboard. I may be returning to Brazil for a while, i don’t know yet if I’m adopting the Brazilian variant or just keep using the German one.

      • @[email protected]
        link
        fedilink
        34 months ago

        Just keep using the layout you’re used to. I’m Brazilian too, but I’ve lived abroad my whole life, and US layout is what I’m most used to (even though I’ve never lived there, funny enough). When I’m on other keyboards, I just switch the layout to US International, and stop looking at the keyboard.

      • Lupec
        link
        fedilink
        25 months ago

        Ah, interesting! I’d have guessed about a dozen annoyances before that one even came to mind haha. Hope you have a good time around these parts at any rate :)

        Also, I’d never taken a serious look at the German layout but going by the truly wild differences there you may as well stick with what you have IMO, I think it’s what I’d do at least.

        • kamenLady.
          link
          fedilink
          25 months ago

          I also never checked the Brazilian tbh. Guess I’ll just check it out, if the opportunity arises.

          Yeah, it’s been a good time here - the pandemic and the inflation made things pretty difficult though, but i assume, just like the pandemic, everyone around the world is struggling with inflation atm.

    • @[email protected]
      link
      fedilink
      English
      2
      edit-2
      5 months ago

      This PT-BR keyboard layout is a mess, a mix between the US layouts and the PT-PT one. That’s why you’ve less than convenient brackets and curly braces. Frankly I see no reason why there’s still this two layouts for the same language. Can’t we just agree on some mix of PT-BR and PT-PT?

  • @[email protected]
    link
    fedilink
    English
    23
    edit-2
    5 months ago

    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)?

    I’m using a PT-PT ISO layout keyboard, zero issues reaching anything, works as good as your US keyboard for coding. Actually it might work better because I have a bigger “enter” key.

    can’t wrap my head around how I would code on those.

    Typical American trying to comprehend that people from other countries exist? :P

    Think about it this way, all the EU keyboards are essentially the same as yours but tweaked to accommodate languages that have more special chars than English.

    • @[email protected]
      link
      fedilink
      35 months ago

      I live in Brazil but I also use US- Dvorak as OP. Is a pita everytime I need to write the ç, or õã cause I have to change the keyboard just to write a letter.

      • @[email protected]
        link
        fedilink
        45 months ago

        You may want to take a look at dvorak-intl and or dvorak-alt-intl, which adds the alt-gr layer to type language specific characters

        • @[email protected]
          link
          fedilink
          14 months ago

          I think I tried it once, but the R and L had their position changed, and not all machines have the intl version so I just went back to the US one.

    • @Olissipo
      link
      2
      edit-2
      4 months ago

      Fellow PT-PT ISO user here. And although I use PT-PT in the OS, both my mechanical keyboards’ physical layout is DE ISO, which has most special symbols in the same place. (finding DE keyboards is easier)

      I’ve considered switching to UK ISO before. Typing brackets “[] {}” and a semicolon “;” is harder in PT-PT. Especially the curly brackets {}, which are really awkward to type with my small hands.

  • @[email protected]
    link
    fedilink
    155 months ago

    If you don’t live is the US, it’s pretty common to not use a US keyboard!

    Tried the maltron layout at one point. Nope.

  • @Vorpal
    link
    154 months ago

    Swedish layout. Not ideal for coding (too many things like curly and square brackets etc are under altgr. And tilde and backtick are on dead keys.

    But switching back and forth as soon as you need to write Swedish (for the letters åäö) is just too much work. And yes, in the Swedish alphabet they are separate letters, not aao with diacretics.

    • Oscar
      link
      English
      5
      edit-2
      4 months ago

      I’m swedish and I use EurKEY. It’s basically US but makes it possible to use Å/Ä/Ö through altgr + W/A/O. I don’t write that much swedish so I’m not too bothered, meanwhile the coding advantage is huge for ' " \ | / ? | [ ] { } .

    • @[email protected]
      link
      fedilink
      24 months ago

      I have the same problem in German (ä, ö, ü and ß), and I’ve resigned to using US layout with caps lock mapped as compose key. But then again, I code more than I write texts

    • @[email protected]
      link
      fedilink
      24 months ago

      Win + space to swap is so fast and simple especially when it also swaps for you when switching apps

    • @[email protected]
      link
      fedilink
      1
      edit-2
      4 months ago

      In polish we have ź and ż. For ż we use Alt gr + z, and for ź we use Alt gr + x. Same for other non-standard letters. The rest of the keyboard is a regular US layout.

      So in Swedish you could use Alt gr + a and Alt gr + s for different variants of a.

  • @[email protected]
    link
    fedilink
    145 months ago

    I program with the italian layout and i’s fine, the only annoyances are that to use the slash you need to use shift, all while the backslash has a dedicated key; also you need to use alt codes to type a tilde.

    • @[email protected]
      link
      fedilink
      35 months ago

      Same. Forward slash always annoys me. It’s in the middle of the keyboard, so you have to either 1. make a very uncomfortable move with your right hand, or 2. make an uncomfortable move with your right hand, or 3. use both your hands, which sucks.

      Luckily I’m using linux, so I have tilde and backtick (`) as AltGr+’ and AltGr+ì, which are pretty easy to type.

      • @[email protected]
        link
        fedilink
        15 months ago

        Just a thing for making it more sufferable; i remember that there was a program for linux called xkeycaps to edit keyboard layouts; so you could swap the backslash with the normal one. I used it so long ago that I’m not even sure if it still available and working though

        • @[email protected]
          link
          fedilink
          14 months ago

          Getting used to it is going to be a hell of a ride, but this is a wonderful thing.

          Also using other pc is going to be even harder lol

    • Nerd02
      link
      fedilink
      English
      15 months ago

      I mainly write JS and not having a backtick on my keyboard annoys the fuck out of me. Other than that the Italian keyboard is alright, never had any other problems with it.