An Elixir-optimized keyboard layout

Roughly a year ago, I found myself inwardly complaining about the fact that my 60% keyboard only had the Control key on one side. This minor inconvenience led me down a rabbit hole of keyboard optimization that is so deep I may never emerge :slight_smile: In any event, I have settled on a 36-key split as my daily driverā€”and in the course of optimizing the layout, it became clear to me that I could do very specific things to make the layout better for Elixir, which is a favorite of mine. After 8 years using Dvorak, followed by a few years back on QWERTY, I had settled into using Colemak DHm as my primary layout for the alpha keys. I wanted to apply the pleasant inward rolls that Colemak was giving me to the symbol layer as well, with some special attention to Elixir. For programming in general, I grouped inward-rolling pairs like +=, (), [], and {}, but I also discovered that by using the grouping: < | - >, I could make comfortable rolls for a number of Elixir conventions all at once (<>, <-, ->, |>). I could also put other commonly used symbols, like " or :, in positions that better reflect their Elixir-specific importance, and still have room for rolled pairings that serve other purposes (like ~/ for Unix file paths). Coupling these improvements with the power of QMK firmware (oneshot layers/modifiers, dual-function keys) has made for a really comfortable and enjoyable experience. I donā€™t have any idea how much overlap there might be between the various communities (Elixir, alt layout, mechanical keyboard), but I thought I would share it here since a lot of my thinking was inspired by Elixir syntax.

If this type of thing interests you, you can see the layout itself in the QMK repo (the symbol layer is towards the end).

If youā€™re wondering about my choice of alpha layout, Iā€™ve written about that elsewhere.

There is always room for improvementā€”youā€™d be correct to point out that EEx openers (<%=) arenā€™t that smoothā€”but Iā€™m relatively satisfied for now.

Anyway, thanks to the community for this awesome language. Iā€™ve only just started my journey but itā€™s really a joy to use.

6 Likes

Sounds very interesting! Can you explain what you mean by ā€œinward rollsā€? I think I have an idea of what you mean but Iā€™m not quite sure.

1 Like

Another IGNORE_MOD_TAP_INTERRUPT user with modifiers on the home row! QMK is great.

I think I switch between languages too often to optimize for a particular language but my symbol layer was designed with ease of access and frequency of use in mind.

http://www.keyboard-layout-editor.com/#/gists/1d60efd48f8824321385b56de1dd373c

1 Like

An inward roll would be the equivalent of typing SDF rapidly on QWERTY. This mimics the way we would normally tap our fingers on a table, rolling from 5th finger to 2nd finger. Try rolling the other direction (index to pinkie). Itā€™s not so easy or comfortable. If you look at my 2nd link (the writeup on alternative keyboard layouts), I show the Colemak layout and give the examples of typing SENTENCE, FRIEND, or FIRST. This is why I paired the braces in the right half of the symbol layer in the opposite manner to the parentheses in the left hand. That way both sides roll inward.

3 Likes

I love home row mods, but in the README youā€™ll see my explanation for wanting 2 sets of Shift keys. I only use the home row shifts for selection and keycuts. But yes, itā€™s life changingā€”without QMK there is absolutely no way I would be comfortable on 36 keys, but with it I feel the skyā€™s the limit :slight_smile:.

1 Like

Iā€™ve been playing with my layouts again lately after a long break.

https://configure.ergodox-ez.com/layouts/mnNX/latest/0

Is my current. I did try having an elixir specific layer but I have too much muscle memory for layer 2 already so I never used it. I ran a few of my codebases through a character counting script and put the most used near my index fingers(Iā€™m also a vim user hence the qwerty hjkl on layer two and the ctrl-[.

Iā€™m still not super happy with it but its a work in progress. Biggest problem is I became so accustomed to my last layout Iā€™m struggling remapping my mental model of my secondary layer. But I have a print out of that layer I put on my laptop which is helping.

3 Likes

Itā€™s really interesting, because either consciously or subconsciously youā€™ve put a lot of the paired symbols in the left hand, where they happen to be inward rolls if placed in their usual order. I think for Colemakers this sort of thing becomes irresistible once you experience it on the alphas. Anyway, a very nice layoutā€”my hands are not big enough for Ergodox thumb cluster reaches, which is a shame, because itā€™s a great community.

2 Likes

My hands arenā€™t big enough either and Iā€™ve been looking at https://shop.keyboard.io/ for that reason.

On mine the two big buttons on the thumb clusters are the only ones used regularly. The outer are just media keys and the small upper inside ones I almost never use.

I also find the inner row hard to reach so its usually blank though in this case I stuck a \ in there which Iā€™m still not sure on.

1 Like

Do you do anything to speed up the process of learning a new layout? Iā€™ve found a couple of things that work well for me.

  1. I add the layout to my wallpaper. That way when Iā€™m having trouble remembering where a key is I can hit Win + D once to show my layout and again to restore my work space.
  2. One of the things I make when learning a new language is this silly little program that helps me learn new layouts.
2 Likes

The ergodox ez configuration stuff lets you print out a layout sheet. I have one of those on my laptop keyboard and Iā€™m forcing myself to look at it if I donā€™t 100% know the character so I donā€™t make mistakes. Itā€™s working but its slow going. The left pinky finger keys are the hardest at the moment. I might move them to index finger area on the number layer soon.

Are you experiencing problems typing on the classic QWERTY keyboards after using those like the ErgoDox for a while?

Iā€™m seriously considering the ErgoDox Glow ā€“ I like its idea, configurability and design a lot ā€“ but I really donā€™t want to lose productivity for no more than 1-2 weeks.

No, I kept my laptop keyboard qwerty and Iā€™m no worse a typer on it than I was before switching. I think Iā€™d be worse at typing qwerty on the ergodox though since Iā€™ve only used it with colemak.

1 Like

Iā€™m sceptical of boards with integrated wrist rests. Iā€™ve moved away from using wrist rests, which were causing me a lot of carpal compression when not perfectly positioned, and this has really improved my typing ergonomics by not ā€˜pinningā€™ my hand at that point of contact. Of course, some people are able to use them only for rest (between bursts of typing), but not having the ability to remove them worries me. If they are separate, you can easily go through periods where you donā€™t use them at all (placing the weight of the arms further back, on the forearms or elbows).

1 Like

I think itā€™s hard to really reap the benefits of QMK and ergonomic layouts unless you commit to it at a certain level. If you are trapped between 2 worlds you will not fully experience the benefit of either, because some portion of your mental energy is always directed at making sure you stay in the correct layout. I wrote about that in my second link of the main post. With Ergodox specifically I think the thumb keys are quite specifically designed for people with large hands. Boards like Corne and Minidox have only 3 thumb keys, but they are 3 really good keys. Ergodox has a lot of keys, but not in positions that are well suited to regular use. I realize that small boards are not for everyone, but itā€™s really hard for me to imagine needing so many keys on a board that runs QMK. Itā€™s different, of course, if the board is not programmable or runs less powerful firmware.

I type mostly at a standing desk with the keyboard slightly below parallel with my elbow so I donā€™t actually hit any wrist rests.

1 Like

I use a keyboardio and love it. The thumb keys in one arc allows them all to be reached and usable. I created an Elixir pipe key, but I need to spend more time with my layout. The numbers I moved to the home row on another layer. The original number keys are shortcuts for switch tmux windows. My wrist pain went away completely. I love the keyboard. If you want to know more let me know. I also have a discount code for it. I get no kickbacks.

3 Likes

Here have some good mechanical keyboard options:

I have a keychron K2 V2, which I recommend. itā€™s very solid and comfortable.