Hacker News new | past | comments | ask | show | jobs | submit login

A keyboard layout for programmers, which allowed the use of special characters on the home row, perhaps by using a mixed corpus of source code rather than just novels, would be interesting to see.

Recently, I ordered the Ultimate Hacker’s Keyboard because I think typing is quite important for a programmer, especially if you consider health as the author of this article does. I’m a little bit weary of not using QWERTY because of the high cost of switching, so if I did switch, I’d want to select a layout that was basically perfect for me long-term (which sounds very tough to do).




"which allowed the use of special characters on the home row"

Unless you're programming in something very symbol-heavy, even by programming language standards, I suspect you'll find that it's hard for any symbol (other than space) to break into the top-10 non-space symbols; not impossible, but hard. I just did a 200KB perl file here, and the top 12 symbols are space, e, a, r, s, i, t, o, n, newline, l, and d. The first symbol, underscore, shows up in position 13, then it's u, then finally, $. Underscore is less than half as popular as the e. As you may guess, the naming convention of this code is mostly underscore_based. If this code was camelcase instead, you'd have to go down to position 14 with $.

The other problem is that languages will significant differ, so you can't really create "a programming layout". If you did nothing but type Perl, that list of symbols may suggest that perhaps $ should be on the u or i key or something valuable like that, but if you run the same process over your C# you're not going to see $ popping up nearly as high and now you've got a huge wasted key. Parentheses are in the 22nd and 23rd slot on this count, the only thing that I would be comfortable saying is really generic. (And then there's still Haskell, where they are used, but much, much less often.)


There's also the difference between what's in the code and what you type. My code is full of colons and commas between named arguments, but those are all inserted by autocomplete in my IDE.


See my other comment in this thread -- this exists for German with a secondary focus on English and programming (neo2: https://en.wikipedia.org/wiki/Keyboard_layout#Neo), and it's what I've been using for at least five years, and I love it. I'm not aware of something similar that is geared towards English and programming, though.

It takes a few weeks to learn a layout that is radically different from what you used before, and sadly the most efficient way to switch is to just dive in and use it all the time, even if it's painfully slow and annoying. I switched when I was in university, but it might be difficult to do when there's someone paying you for things that require typing.


If you have keyboards with physically different layouts—e.g. one ergonomic, one typical laptop, one swipey touchscreen—and use them all at least occasionally, you’ll be able to develop independent muscle memories for each.

Go ahead and learn a different layout on a fancy keyboard, while keeping a stock standard layout (not even remapping Caps Lock to anything!) on a laptop keyboard, and I understand you’ll have little-to-no trouble with it.

(I’m only early on in this process myself, but have been told this by others and it makes sense to me. As one small example I have experienced, I automatically switch to using Cmd for shortcuts instead of Ctrl with no thought, as soon as I’m faced with an Apple keyboard—regardless of the OS, which has tripped me up a couple of times!)


I can confirm that having physically different keyboards makes it much easier to switch back and forth. Many years ago, I worked for a company that had a mess of old Sun hardware in the lab with the old Sun-layout[0] keyboards. After about a week of using them, I was pretty comfortable using them, and had no trouble switching back and forth the the customary layout keyboard at my desk.

One day, I discovered the one Sun machine that had a Sun-manufactured keyboard in the customary layout. I was incapable of functioning because I expected it to be in the Sun layout. I had to switch it for a Sun-layout keyboard so I could get some work done.

As an aside, I decided I prefer the Sun layout, and so I've remapped the 6 or so keys via software on basically every computer I've used since. The only issue is the `~ key, which ends up on [ESC], since I haven't yet found a keyboard that has the [backspace] key split in two.

In practice, this isn't much of an annoyance to me. My wife, however goes nuts any time she needs to use the computer for "just a second" and doesn't log me out. I've since gotten better at switching, and if I have to type something when she's logged in, I usually flip the switch pretty quickly.

[0] https://deskthority.net/wiki/Sun_Type_5#Layout


For a keyboard with separate single-width E13 and E14 (like the old 84-key PC/AT keyboard and the Sun Type 5) instead of a single double-width key spanning both, you want the JIS 109-key Windows keyboard or the Korean 106-key Windows keyboard.

* http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode....

* https://commons.wikimedia.org/wiki/File:Korean_106-key_keybo...

* http://www.ps-aoki.com/~ace/ebay/pc/keyboard/5W_1.jpg

The 104-key Windows keyboard moves the old PC/AT E13 key to D13, and the 105/107-key Windows keyboards move it further to C12. The 106-key Windows keyboard has it back at E13. The JIS keyboard actually has that key at C12, though. Its E13 key is another key with a different PS/2 scancode and USB HID usage. This is important to know when remapping the keys.

(I have the JIS E13 mapped to the FEP/IM toggle, a.k.a. Zenkaku/Henkaku/Kanji, in my U.K. International and U.S. International maps, with the E00 "Grave" key retaining its usual mappings.)


Sun keyboards are nice for pair programming, since when your partner does something good you can press the 'props' key.


Oh! I have an answer for this one on Mac. https://github.com/tekezo/Karabiner-Elements

It let's you software remap keys. I've entirely disabled my caps locks key (I barely ever used it) and turned it into a combo esc/modifier key.

Holding caps plus a home row key types the corresponding symbol (e.g. "a" is "!", and ";" is ")". I also have u,i,o,p mapped to arrow keys (similar to vim). Then some misc. combos for things I commonly program (e.g. caps + m = "() => {}" - very helpful for JS)


> I’m a little bit weary of not using QWERTY because of the high cost of switching, so if I did switch, I’d want to select a layout that was basically perfect for me long-term (which sounds very tough to do).

Similar to programming languages, after learning a second keyboard layout the switching cost will be much lower for each additional one.

I switched from QWERTZ (German) to QWERTY (US/international), because it is already much better for programming, and am currently trying out Colemak, and it was much easier to adopt (=get to a reasonable workable speed).


That is good to hear! I didn’t realise until just now that I just assumed each additional keyboard layout would take an equal amount of effort. Plus, minor variations may be much easier to adapt to.


> special characters on the home row

In my opinion, the best setup would be an ortholinear keyboard with not many keys and multiple layers (let's say something like a Planck), but instead of using key combinations to change layers, use pedals.

I know there has been some attempts to do something like this, but I've never tried it. Has anyone here used a similar setup?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: