I would like to hear opinions on keyboard layouts for programming.
I was brought up in the UK so was used to the UK keyboard layout, but worked at CERN in Switzerland where there was a very odd Swiss layout as I remember (I had a Falco terminal which switched between VT220 emulation and Tektronix. Think about that the next time you complain about Julia Plots in the REPL)
When I went to ASML in the Netherlands the whole company had decided to standardise on the US keyboard layout. Which was a Good Thing TM in my opinion.
When I bought a new laptop I made sure it had a US layout.
I am now working in Denmark and the Scandinavian layout drives me spare. I still cannot find the carat symbol (its there on a keycap above à ⌠but âŚ)
So a point for discussion. Programming languages, such as Julia, have a heavy reliance on symbols such as - > |
What are the opinions on keyboard layout for productivity?
Interested to hear from Julians who do not use the Roman alphabet in their mother languages also.
@pkofod I am in Bagsvaerd. Not at Novo Nordisk but next door at Novozymes. A bit of a Python shop reallyâŚ
I knew a Per Kofod from SGI Are you related?
Also I know that Julia is being used by a company nearby for digital signal processing.
My native language is Hungarian, which has a lot of accents, but I find anything but the US layout suboptimal for programming. My compromise is the alt-intl layout in Xorg, I enable and disable it with CapsLock and Shift-CapsLock, and use 'a to type ĂĄ, etc, whenever I have to type accented chars. The relevant snippet for xorg.conf.d is below.
Also, it pays to learn some level of touch typing. This usually happens automatically. Using a single or a small number of keyboards (eg your laptop, office keyboard, possibly a home keyboard) also helps. Set everything to the same layout and ignore the labels on the keys.
I am also on a Swedish keyboard and can attest to the fact that it is extremely painful to do any kind of programming with. The main problem is that you need the AltGr key (immediately right of Space) to access all the following characters: [ ] { } ~ \ | $ @. And the keys you need to hit with AltGr are awkwardly situated in the top row under the number keys (or way to the left for |). Hereâs an image of the layout we have to deal with.
But after many years of pain I finally have a solution Iâm happy with. When programming, I switch to a custom keyboard layout which gives easy access to the keys you normally need AltGr with (all other keys are in the standard positions in the Swedish layout) and hide the default Swedish keys under AltGr instead. When typing in Swedish I switch back to the standard layout.
If anyone is interested, these are the keys I remap:
Ü => [ ä => ] à => { à => }
ü => \ à => | ¨ => ~ (not quotation but the diaeresis modifier key)
§ => @ ½ => $ (these are permanent remaps because § and ½ are completely useless)
Custom layouts can be created using Microsoftâs tool, and Windows lets you define keyboard shortcuts to quickly switch between layouts without touching the mouse. However, since I always have AutoHotKey running in the background for other reasons, I just do the remapping in an AHK script instead.
Believe me when I say itâs totally worth the hour or two of setup time you need to fix this problem once and for all.
I use the standard XKB Norwegian Dvorak layout with two alterations to get the tilde, circumflex, and dollar signs in âeasy-to-accessâ positions. This works really well, but I dread the day that I start working in a place that wonât let me use Dvorak; my productivity will take a serious hit
In the unlikely case that anybody is interested, my two changes to the XKB symbols file no is