this post was submitted on 29 Jan 2024
86 points (100.0% liked)

Programming

426 readers
10 users here now

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



founded 2 years ago
MODERATORS
 

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

top 50 comments
sorted by: hot top controversial new old
[–] UndercoverUlrikHD@programming.dev 58 points 1 year ago (1 children)

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

[–] KeenFlame@feddit.nu 2 points 1 year ago (1 children)

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

load more comments (1 replies)
[–] JackGreenEarth@lemm.ee 34 points 1 year ago (1 children)

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

[–] peter@feddit.uk 36 points 1 year ago

Average American trying to comprehend that people from other countries exist

[–] lupec@lemm.ee 15 points 1 year ago (1 children)

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@feddit.de 4 points 1 year ago* (last edited 1 year 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.

[–] Kolanaki@yiffit.net 15 points 1 year ago

They told me not to reinvent the wheel, so all I need to program is this:

[–] brokenlcd@feddit.it 12 points 1 year ago (6 children)

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.

load more comments (6 replies)
[–] vext01@lemmy.sdf.org 12 points 1 year 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.

[–] Maturi0n@feddit.de 11 points 1 year ago

I am German and I use the German keyboard layout...

[–] Vorpal@programming.dev 10 points 1 year ago (3 children)

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@programming.dev 6 points 1 year ago* (last edited 1 year 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 ' " \ | / ? | [ ] { } .

load more comments (2 replies)
[–] Solaris1789@jlai.lu 9 points 1 year ago (3 children)

quick AZERTY users this is the time to show we exist!

load more comments (3 replies)
[–] snowe@programming.dev 9 points 1 year ago (6 children)

my keyboard looks like this... so... no?

and honestly it's so much nicer to program with a small keyboard. everything is exactly where you need it to be. I don't ever have to reach for a key, as they're all right there. And I can make them do literally anything I want. So many benefits of a small keyboard over a full size.

[–] noddy 6 points 1 year ago (2 children)

Why are there two cables connecting the left and right part? Just curious.

[–] bugsmith@programming.dev 4 points 1 year ago

I believe the lower cable connects the two boards. The upper cable is for connecting to your device, so would only be connect to one of the boards when in use.

load more comments (1 replies)
load more comments (5 replies)
[–] germanatlas@lemmy.blahaj.zone 9 points 1 year ago

I use German QWERTZ

[–] Ferk@kbin.social 8 points 1 year ago (1 children)

I use EURkey, which is basically a superset of the US layout extended to support symbols from several European languages.

load more comments (1 replies)
[–] Kusimulkku@lemm.ee 7 points 1 year ago (1 children)

You just... get used to things. Like how you first got used to your keyboard to begin with

load more comments (1 replies)
[–] 0xCAFE@feddit.de 7 points 1 year ago (6 children)

I use a variant of the Neo-Layout called Bone. It's an ergonomic layout optimized for German and English text. The base layer is already different (see the linked page), but I also really like it for programming, since there's an entire layer with easily accessible symbols:

Bone layout layer 3 with symbols

load more comments (6 replies)
[–] DirigibleProtein@aussie.zone 6 points 1 year ago

Well, technically Dvorak is a US-ANSI layout, so … no.

[–] Oha@lemmy.ohaa.xyz 6 points 1 year ago (1 children)

I use german layout because I'm from Austria

load more comments (1 replies)
[–] Zip2@feddit.uk 6 points 1 year ago

I’m British and use the ISO-UK layout.

[–] MudMan@kbin.social 5 points 1 year ago

It's all usable when you get used to it, but this is a great thread to link for people who develop scripting and programming languages, or just text-based technical interfaces. Because yeah, all that crap is designed with the US layout in mind and screw whoever chooses to use ~ and | as commonplace characters.

FWIW, I don't even code and I still keep a US layer in the background. I forget which one I'm using constantly, it's all muscle memory. I just Win-space and try again whenever I type a character and it's not what I expect.

[–] MonkderZweite@feddit.ch 5 points 1 year ago

CH layout, superior for everything inbetween german, italian and french. US layout has no äöü, which makes it cumbersome in daily use.

[–] catacomb 5 points 1 year ago

I use a UK keyboard, | is pretty easy to access and $ is Shift+4.

I'm guessing you mean more exotic keyboards. I've used a Swedish keyboard while helping a friend and I had to ask where every key was. You probably just learn the combinations eventually.

[–] bort@feddit.de 4 points 1 year ago* (last edited 1 year ago)

I use UK-Layout, with some remappings for my precious umlauts

q+altgr ->ü
a+altgr -> ä
s+altgr -> ß
z+algr -> ö

bonus: in contrast to the peasentry I have an uppercase ẞ (altgr+shift+s)

[–] Adanisi@lemmy.zip 4 points 1 year ago

UK QWERTY, no trouble hitting any keys. $ is not hard to reach, | is a bit annoying since it's right next to shift, which you need to type it, but it's not too bad.

[–] dosse91@lemmy.trippy.pizza 4 points 1 year ago

I'm italian and I'm absolutely ashamed to say that I use an italian ISO keyboard for programming. It's missing some symbols like the backtick but I can't get used to US ANSI so I just configured some macros to type the missing characters.

[–] Kimusan@feddit.dk 4 points 1 year ago

I prefer ISO layouts. ANSI somehow just seem inefficient to use. I habe layers for CODI g so I have my brackets/braces on the hometown along with other relevant keys. Long live custom keyboards

[–] Gobbel2000@feddit.de 4 points 1 year ago

I use Colemak where most punctuation is at the same place as in the US English layout, which programming languages seem to be optimized toward. For the layout I prefer ISO for the larger Enter key.

It depends on what you're used to and the programming languages you use. I learned typing on a German QWERTZ keyboard and while that works for languages like Python and Haskell, which are indentation-based, but for languages which use braces like Java, C, Rust, or similar, it can be annoying to have to use altgr+7 or altgr+0 for { and }. Thus I switched to a US ANSI layout, which was nicer for those specific characters, but caused problems when typing local characters like öäüß. After switching to Linux I set up a compose key, letting me press compose + a + " for ä for example, and while that's a decent patch, that still breaks the typing flow. So now I'm in my ergo keyboard phase and trying to get my own personal layout going, which meets my own needs for needed characters, based on a colemak-dh design.

[–] bugsmith@programming.dev 3 points 1 year ago

I use UK standard layout, and Apple UK for work. It always takes me a few minutes to switch between them, but both are absolutely fine for programming. Just the odd placement of # that bothers me a little, but I tend to use that only for Python comments - which I tend to do more commonly from a keyboard shortcut anyway.

[–] SuperFola@programming.dev 3 points 1 year ago

I use a plain 34 keys layout based on qwerty for letters, comma/dot/semicolon. The numpad and symbols layers are handcrafted so that every symbol is easy to reach, it's also optimize to type things like <- and -> easily

[–] otarik@feddit.it 3 points 1 year ago

You can adapt to a new layout pretty easily. I already did it twice due to moving to new country.

[–] benjhm@sopuli.xyz 3 points 1 year ago

I began programming java climate model with UK keyboard. When I moved to the continent, switched to swiss then belgian keyboard to better type emails/docs in french, but it was so tedious for code brackets {[()]} and some other punctuation, eventually switched back. Recently converted whole codebase to Scala 3 (here's the model), now can drop most of those brackets. I speculate whether one motivation for creating scala3 (made in in Lausanne) was swiss/french keyboards.

[–] Jomn@jlai.lu 3 points 1 year ago* (last edited 1 year ago) (1 children)

I use the FR-AZERTY layout. You honestly get used to the layout you have to work with.

[–] wgs@lemmy.sdf.org 2 points 1 year ago (1 children)

Did you know about the New AZERTY ? I've been using it for a few years now and it's definitely a great improvement, while remaining compatible enough with the standard one so you are not lost when you use a colleague's setup.

[–] Jomn@jlai.lu 2 points 1 year ago (1 children)

I heard about it, but the issue I usually have with other layouts is that I find myself looking for “infrequent” symbols a lot. Maybe this one would be easier to get used to than other layouts such as Bépo since, as you said, it is relatively compatible with regular AZERTY.

load more comments (1 replies)
[–] KindaABigDyl@programming.dev 3 points 1 year ago

I can't even wrap my mind around people who use 60% keyboards and use a bunch of extra function keys let alone anything more drastic

[–] Canadian_Cabinet@lemmy.ca 3 points 1 year ago

I do! ISO-ES the only real annoyance is that / is locked behind Ctrl+7 instead of next to the spacebar. My laptop is also in ANSI despite me using ISO so I'm missing a couple of keys

[–] Pamasich@kbin.social 2 points 1 year ago

I just use the Swiss keyboard layout. Here's an image from Wikipedia.

Don't have any experience with any others.

[–] Mechaguana@programming.dev 2 points 1 year ago

French keyboard azerty has easier accents, cant live without em now.

Used to have a qwerty so sometimes the muscle memory derps a little, but when I accidently change the layout Im always mildly impressed that I can remember which key is which.

[–] natecox@programming.dev 2 points 1 year ago

I use a sub-40% layout that I love. I wrote all about it here: https://natecox.dev/lets-talk-about-keyboards

[–] Dequei@sopuli.xyz 2 points 1 year ago (1 children)
load more comments (1 replies)
[–] brie 2 points 1 year ago

Used US and JP qwerty, both are fine after a while, but switching can be annoying (mostly I mix up whether " or @ is Shift-2).

The one thing I hate is the fragmentation of the bottom left cluster. I started out on keyboards with Ctrl Fn Super Alt, but now I much prefer Fn Ctrl Alt Super.

load more comments
view more: next ›