
Show HN: Crackle – keyboard layout for programmers - jackcouch1
https://medium.com/@jack_21924/crackle-keyboard-layout-for-special-characters-e4dd04838231
======
sedachv
The best modification that you can do to your keyboard layout is to adapt the
MIT Lisp Machine keyboard layout. The changes are small but very significant,
work with either QWERTY or Dvorak, and you can do them on any PC or laptop
keyboard[1]:

1\. Change the layout of modifier keys from Control-Windows-Alt-Spacebar-Alt-
Menu-Control to Windows-Alt-Control-Spacebar-Control-Alt-Windows (bind the
outermost modifier keys to Super and Hyper if you use Emacs). This will let
you do keyboard chording easily with either hand and eliminate "Emacs pinky":
[https://retrocomputing.stackexchange.com/questions/495/what-...](https://retrocomputing.stackexchange.com/questions/495/what-
do-the-keys-on-this-symbolics-space-cadet-keyboard-do)

2\. Change Caps Lock to Backspace (RUB OUT on Lisp Machine keyboards)

3\. Swap parentheses () for square brackets []

[1] Not on OS X though. Apple does not provide a way to do these remappings on
OS X, and breaks the keyboard internals and consequently third party tools
like PCKeyboardHack/Karabiner with every OS X release. I tried early this year
with Sierra and Karabiner-Elements and this did not work. Install Linux or
OpenBSD.

~~~
stephengillie
The best improvement you can make to your mouse is adapting a 12-key thumb
layout:

    
    
      F5    | Up    | F2
      Left  | Down  | Right
      Tab   | Delete| Backspace
      Enter | Space | ESC
    

How many times an hour do you have to reach over to the keyboard, press an
arrow or Enter, then have to reach over and find your mouse again? All those
seconds add up! Do your eyes leave the screen to find your mouse? This
configuration lets you maintain your state of flow, because your hand almost
never leaves your mouse, except for actual typing.

You'd be surpised how many tasks can be performed with just the mouse (and the
left hand for CTRL+C,CTRL+V). This is the most efficient layout I've found.
I've used this for about 5 years now, for massive performance gains in many
administration and development roles.

~~~
kutkloon7
Funny how a lot of people have a strong and exotic opinion about the best way
to use a mouse/keyboard, but I've never seen anyone actually use a dvorak or
any other exotic layout. My personal fetish is to use a standard US keyboard
with a trackpoint. The only thing I hate is that I have to move my hands to
get to the arrows, home, end, delete, page up and page down keys.

~~~
mclehman
I for one use not just an exotic layout, but a homegrown one. My alphas match
the Workman layout, and I use a 12 column, 4 row keyboard (a Planck form OLKB)
so that I have plenty of thumb keys.

Symbols are kept on a separate layer of keys alongside a numpad, so that they
can be grouped by how I use them. Parens, brackets, braces, are all in the two
leftmost alpha columns. I keep $, @, and % in a column because I use Perl
fairly often. I also keep # and ! together for fun.

Now, I'm not saying it's particularly common, but I have a friend with a
similarly exotic setup and we use them on a daily basis.

------
donatj
"[T]he evidence in the standard history of Qwerty versus Dvorak is flawed and
incomplete. [..] The most dramatic claims are traceable to Dvorak himself; and
the best-documented experiments, as well as recent ergonomic studies, suggest
little or no advantage for the Dvorak keyboard."

It's an urban myth that Dvorak is any better than qwerty.

~~~
shpx
I used to be around 80 wpm with qwerty, now I'm 65 on dvorak, but it's much
more comfortable.

It's hard to explain, but it feels satisfying to type. When I think about a
word I'll sometimes think about what motions it takes to type it (on dvorak)
and it just feels comfortable in my head. No regrets about the loss in typing
speed.

The worst part about using dvorak is that no software is (or ever will be)
designed for dvorak. Vim and emacs still work great, most shortcuts are
phonetic and jk are where cv are, so I don't really mind.

I have been waiting for someone to sit down and redesign the keyboard layout
for programming, and maybe this is it.

I've been typing on Programmer Dvorak[0] for 3 over years.

[0]
[https://www.kaufmann.no/roland/dvorak/](https://www.kaufmann.no/roland/dvorak/)
it comes with most (all?) Linux systems `setxkbmap -layout us -variant dvp`

~~~
btym
Same, with Colemak. I actually type a little faster now, but the major benefit
is how comfortable it is. Hardly have to leave the home row.

~~~
s_kilk
+1 for colemak.

I've used all of Qwerty, Dvorak, Programer Dvorak, and Colemak. I think
Colemak is the clear winner in terms of comfort. I also don't care much about
speed, I just want to not have my hands ache by the end of the day.

------
Zekio
After programming with a danish keyboard layout for a few years which require
double modifier such as ctrl + alt + 8 to make { or [

I noticed on US keyboard layout you only have single key modifier and only
have two characters per key instead of three, which I then bought a laptop
with and it is an amazing difference after typing for 8 hours especially
because you do less weird postures with your hand in order to make a single
character.

Never gone back to the danish keyboard layout, I now only keyboards with the
US keyboard layout and it is actually possible to use hotkeys in most software
now as well yay!

~~~
ogrim
I am in the same situation. I only switch to Norwegian layout when typing
emails, all other times I use US layout. The keyboard is blank, so no
confusion with keys either.

~~~
rhaps0dy
Same, but with a Spanish keyboard, and non-blank keys.

In fact Spanish keyboards are physically like UK keyboards, so slightly
different from US keyboards, so the layout I've now gotten most used to is
nonexistent.

Note the different shape of the Enter key, and the additional key on the
bottom left:

[https://d25rq8gxcq0p71.cloudfront.net/language-
guide/758/es-...](https://d25rq8gxcq0p71.cloudfront.net/language-guide/758/es-
keyboard.jpg)

[https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/KB...](https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/KB_United_States-
NoAltGr.svg/900px-KB_United_States-NoAltGr.svg.png)

------
jdc0589
this is a problem that a lot of people just don't notice because they are so
used to a sub-optimal positioning of symbol keys/etc... When I built an
ErgoDox and started using it full time a few years ago all the symbol keys
moved (still not optimized in the default layout in my opinion), and that's
when I finally realized it could be better. The ergodox (or any diy board with
its own customization firmware) is cool cause you do all your remapping via
firmware and it just looks like a normal old keyboard to the computer.

Here's my qwerty based ergodox layout; its still not great, but its miles
better than normal symbol layouts on a std keyboard for me. I really only use
layers 0 and 1. I need to add a layer 2 shift key and put arrow keys under the
ikjl key positions, I just haven't done it yet.
[https://www.massdrop.com/configurator/ergodox?referer=MSCE5S...](https://www.massdrop.com/configurator/ergodox?referer=MSCE5S&hash=4686932213aa816d7d2fc412101c0164).
I'm an osx user for the most part, hence the easy thumb access to the
command/windows key for the left thumb.

~~~
jtreminio
Can you upload your config somewhere else? Link is not working for me.

I purchased an ergodox ez, and while I love the feel of the mechanical keys,
the default layout, and any layout I can up with, was too radically different
from normal qwerty.

So I purchased a matias ergo pro, which is great, and can do negative tilt
which the ergodox can't seem to do natively.

~~~
jackcouch1
The link on medium is to google drive. Here is a link to the file on dropbox:
[https://www.dropbox.com/s/c3ssc40svbmagfu/karabiner.json?dl=...](https://www.dropbox.com/s/c3ssc40svbmagfu/karabiner.json?dl=0)

------
Rotareti
After 25 years of typing I decided to switch to the vi style of editing. Now,
about 1 and a half years later, I use it everywhere and I regret that I
haven't started earlier. I find it relaxing and it keeps me in a more content
state while programming.

Btw. I'm not using Vim, except for some small edits from the terminal. But
there is a vi plugin for the most important tools that I use:
(JetBrains:ideavim, Firefox:Vimperator, ZSH:vi-mode, Emacs:evil-mode,
Atom:vim-mode)

I think a lot of what the author tries to solve could be solved by switching
to vi-style editing. He introduces two new modifier keys to increase the
number of actions you may bind to a key, Vi uses modes (normal-mode, insert-
mode,..) to achieve the same thing.

But I really like what the author does with the brackets! Putting the opening
brackets on one hand and mirror the closing brackets onto the other makes a
lot of sense to me. I think I'll try out something similar by switching ! with
{, + with }, @ with [, _ with ] , etc.

------
nemetroid
And still the numbers are in order. I mean, how often do you write the number
6? Does it really deserve to be right in the middle, while 1 is the hardest to
reach?

I am only half joking. I've yet to see a keyboard layout that puts the numbers
in a different order.

~~~
limeblack
Programmmer Dvorak is in a different order
[http://xahlee.info/kbd/dvorak_and_all_keyboard_layouts.html](http://xahlee.info/kbd/dvorak_and_all_keyboard_layouts.html)

In fact Dvorak originally had the numbers in a different order
[https://en.m.wikipedia.org/wiki/Dvorak_Simplified_Keyboard](https://en.m.wikipedia.org/wiki/Dvorak_Simplified_Keyboard)

------
kozikow
I created a layout based on similar assumptions a few years ago. Blog post:
[https://kozikow.com/2013/11/15/the-only-alternative-
keyboard...](https://kozikow.com/2013/11/15/the-only-alternative-keyboard-
layout-youll-ever-need-as-a-programmer/) (including OSX implementation). I
also created Linux implementation:
[https://github.com/kozikow/keyremaplinux](https://github.com/kozikow/keyremaplinux)
.

It's also targeting "special" keys rather than letters. The difference is not
using modality, but utilizing the right cmd (or the right alt on linux) to
activate a layer with all special characters. Conflicts with qwerty are
minimal, so you can install it on top of qwerty.

------
mmanfrin
Wow, medium is now modal-overlaying a sign-in/up screen on load; they are
really doubling down on those A/B tests.

------
__jal
Not the same thing at all, but when I used to write a ton of Perl, I had a
board on which I mapped the shift-number keys (punctuation) to the F-keys. It
was really rather nice.

These days I mostly use keyboards with fully programmable firmware (QMK, when
possible) and remap things as needed. Things that stay pretty consistent are
swapping caps lock and control (the way dog intended it), adding pipe as
layer1-~ (shift-\ is terrible to type with one's right hand, and somehow I
haven't trained myself to do that two-handed), and mapping parens to later1-o
and -p.

Never played with a Dvorak or Colemak.

------
isodude
Long time Dvorak fan here. Great to see an initiative like this :)

When I have to use Apple products I tend to use Karabiner Elements to swap
place between Right ALT and Caps Lock, to ease with all the combinations.
Seems to do the trick to avoid pain.

Also there is a nice implementation called Svorak A5[0] of this (although
based on the Swedish Dvorak layout), that I learned and find productive.

0: [http://aoeu.info/s/dvorak/svorak](http://aoeu.info/s/dvorak/svorak)

Edit: It's Right ALT and not CMD that's switched.

------
reacweb
I am french and recently I had to use a qwerty keyboard for programming. The
layout is so nice to use I wonder if I will no switch definitely on qwerty.
For example the keys '<' '>' and '/' for xml documents. I guess many syntax
have been adopted in languages to take profit of keyboard layout.

I think you under appreciated the luck you have using a qwerty keyboard
compared to all the international silliness.

~~~
breakintheweb
As an american living/working in france I feel the pain of the azerty.

Si vous décidez de changer, je recommande le français canadian clavier. C'est
le qwerty clavier avec quelque modifications mineures. Je pense que c'est un
bon conpromis.

~~~
Raphmedia
French Canadian keyboard is quite good. It's pretty much "Qwérty". Standard
Qwerty but with accents that are easy to reach.

------
pkamb
Is there support is OS X for changing normal letter keys into properly
functioning modifier keys?

CMD with my thumbs, and Shift, are the only modifiers I can _comfortably_
type. RSI pain in my pinkies really limits Option and Ctrl.

It would be interesting to have a chording setup with keys on the home row.
Hold "D" \+ type a key with your Right hand, and vice versa for "K" and the
Left hand.

~~~
jackcouch1
I actually got really excited about doing that, but it turns out that apple
keyboards are only reliable for a total of 2 simultaneous.

~~~
pkamb
Is that due to the physical Apple keyboards? Or OS X?

~~~
jackcouch1
Yes, if you hold down J and Semicolon and then hit the a button on a macbook
pro you will notice it isn't picked up. It is a hardware limitation on most
keyboards. See "n key rollover" in google for more details.

------
Tade0
My biggest problem with keyboard input is not the positioning of the keys -
most of the time it's either weird default shortcuts(like Ctrl + Alt + Shift +
Insert) or the lack of a numpad - It's remarkable how good of an idea it was
to have the plus sign under one, pretty large key.

Also smaller keyboards(think 13,3" laptop) are to me plain bad, because
everything is so crammed.

~~~
keithnz
have you tried Vim? or Vim keybinding in your favorite editor?

~~~
Tade0
Yes, a few times - the first around 10 years ago. Not my cup of tea.

------
HurrdurrHodor
I have been using [http://neo-layout.org/](http://neo-layout.org/) for years
now and it works very well comes out of the box with Linux and does pretty
much the same. If you type only in english you will be wasting a few keys
because it has german umlauts but it is imho still nicer than qwerty.

~~~
anotheryou
At least with the windows AHK implementation you can also keep the qwerty
layout and just use the two useful additional layers with the special
characters and arrow+number keys.

------
tomlu
Why do you need both snap and pop? I use something similar, but get by
perfectly well with only one layer for all programming symbols. Seems your
life would be a little easier if you didn't have to surrender another two keys
for your pop modifiers.

~~~
jackcouch1
I wanted to keep all of the keys fairly close to the home row. If I do that I
can't fit all of them under just snap. It's already full.

~~~
deathanatos
Are your snap and pop keys shifts (works like shift), dead keys (I full press
& release, then strike another key), or locks (like a dead key, but good until
I strike it again to unlock it, e.g., caps lock)?

(Let's say lower case is your first layer, upper case is your second layer,
snap is your third layer, and pop is your fourth layer.)

I've worked on a similar design, and I've replaced Caps Lock with a "level 2
shift", which gets me to third layer. (Perhaps in your case, "Snap") The
fourth layer is then Level 2 Shift and normal Shift, together.

If your snap & pop keys are shifts, combined with normal shift, you have a
total of eight layers, potentially.

(I was inspired by the Neo Layout[1], but it's for German.)

(Also, since programmers often use - and _ for word separators, I put those on
the space (which is a word separator) bar; they're level3+space and
level3+shift+space, though I don't remember which was which. This made sense
to me, but keyboard layouts are a personal thing, I think.)

[1]: [https://neo-layout.org/index_en.html](https://neo-
layout.org/index_en.html)

~~~
jackcouch1
Both of the modifier keys (Snap and Pop) work just like Shift and Control. You
hold them down to get the other layer. On mac keyboards you can't count on
more than 2 keys pressed at the same time so a Shift + Snap + A might (or
might not work). I had a few failed attempts at combo modifiers before I
decided they wouldn't be reliable enough (at least not on my mac pro).

------
thebelal
Dvorak users in this thread should really give Colemak [1] a try. Dvorak has a
number of issues [2] in modern usage and is also harder to learn; many more
keys change from their QWERTY equivalents.

I have used QWERTY, Dvorak and Colemak for multiple years and Colemak is the
clearly the best of the there for me.

[1]: [https://colemak.com/](https://colemak.com/)

[2]:[https://colemak.com/FAQ#What.27s_wrong_with_the_Dvorak_layou...](https://colemak.com/FAQ#What.27s_wrong_with_the_Dvorak_layout.3F)

------
equalunique
I love Dvorak and I love my Atreus in Dvorak-mode.
[https://atreus.technomancy.us/](https://atreus.technomancy.us/)

------
Graziano_M
I find the better approach is just to use a keyboard layout you like, and then
use hotkeys on top of that. It's best if they are standard. OSX does great at
using readline hotkeys. ctrl f, b, h, d, e, a, w, u are all used daily by me.

They are: * f - forward char * b - back char * h - backspace * d - delete * e
- end of line * a - start of line * w - delete word left * u - delete line
left

------
epx
The standard PC-104 keyboard is indeed bad layout. I think the biggest benefit
of such a small layout is the size, but a 60% keyboard is readily available
and yields this advantage right away. For people that can't live without arrow
keys, a 65%. I'd buy a hard version of this keyboard though, I am curious
about using a 40% layout...

~~~
Insanity
I could not live without my 60% keyboards anymore. I have one for at home and
one for at work, and I'll never use a full-sized keyboard anymore. They feel
so clunky and take up unnecessary space.

The next board I'll be building will be a 40% board (Hopefully the minivan [0)
though I don't think I will use it for coding. My main use for it will be just
typing tests and recreational use.

[0]:
[https://f3a98a5aca88d28ed629-2f664c0697d743fb9a738111ab4002b...](https://f3a98a5aca88d28ed629-2f664c0697d743fb9a738111ab4002bd.ssl.cf1.rackcdn.com/2017-01-10-124455.jpeg)

------
notananthem
Posting from a 40% 3 layer keyboard... heck yeah. Stupid arbitrary keyboard
layouts are awesome, added benefit is nobody will ever come up and be like let
me type something into youtube to show you.

~~~
isodude
You mean when a colleague comes over and want to show you what they mean by
doing it themselves and you're like, nope, won't work.

------
bikamonki
What about @? It should have its own key already. Smart phone keyboards make
it readily available in login forms for a reason.

~~~
k__
But where do you really have to type it anyway?

~~~
baddox
In Ruby code.

~~~
joatmon-snoo
Perl and Bash too.

~~~
EpicDavi
Python function decorators and Java annotations too.

------
Fej
We already have more modifier key names, meta/super/hyper. Although I'm not
sure that's enough.

~~~
jackcouch1
Sure, but Snap and Pop on a keyboard named Crackle? Way more fun.

------
SuperPaintMan
Really sad there isn't a Xmodmap configuration for this and that I'm not
skilled enough to create it :(

------
arvinsim
Does this only work with Karabiner-Elements, not the original Karabiner? I am
still on El Capitan.

~~~
jackcouch1
It works on El Cap too. But it's another config file. I'll dig up and post it
shortly.

~~~
arvinsim
Thanks! I can't wait to try it out :)

