1. 26

This question is inspired by the recent post about Ergodox EZ: https://lobste.rs/s/hpsxnq/review_ergodox_ez_keyboard. There, I asked about layers and /u/matklad shared how he used a key to switch to another layer that is for arrow keys. That was a real game changer for me and improved my productivity a lot. I noticed I’m not dreading to use arrow keys anymore (they were placed at the bottom right hand row of my Moonlander and contorting my small hands). Since then, I did a couple of more improvements, but nothing significant. I’m still just observing what I do and thinking how to reduce the strain – for example, I plan to ditch the whole top row with numbers and map them to another layer, just like on the numpad.

So my question is: what are your productivity hacks with layers on your keyboard? What changes improved your workflows?

  1.  

  2. 9

    Fn-numpad was definitely the #1 biggest boost for me, but I am also fond of having parens, brackets, and curly braces all either on the home row or home-row-adjacent.

    Arrows on ESDF instead of WASD was also a big improvement, if your board has nice column stagger. I would have considered arrows on hjkl, but I didn’t want to move the numpad to the left hand.

    1. 2

      I can see how easy access to various parens would be good for programming. Do you type numbers so often that a numpad (rather than/in addition to) a number row is that much of an issue? Or is it more about comfort (as I think you mentioned elsewhere) when you do?

      I have a Moonlander (on your recommendation) but I don’t use multiple layers (yet). I do have a button that sends M-x for Emacs though :-)

    2. 8

      Each key except h j k l are layered. The mappings are here:

      https://github.com/nikitavoloboev/dotfiles/blob/master/karabiner/karabiner.edn

      i.e. My w layer will open apps

      w+k = open safari (browser) w+l = open vs code (code) w+j = open iTerm (terminal)

      My e layer is CMD key

      e+k is CMD+k e+w is CMD+w

      My . key will insert code fast for me, mostly logging

      So in JS mode, .+a will insert console.log()

      This is just a glimpse of course, there is 800+ lines of these kind of configs. Most keys are mapped in this way.

      If you want to read the config, it uses Goku which has a Tutorial.

      1. 2

        This is pretty amazing that you built everything in Karabiner. I’ve only dipped my toes in it, and I remap caps-lock to “espace when pressed, hyper when held”.

      2. 8

        My first keyboard with limited space was the Planck EZ. I would not recommend this particular keyboard, but I love the “3x6” (on each hand) form factor and have stuck with Planck’s raise/lower/adjust style layers.

        Instead of the thumb keys that a Planck uses, I put my layer toggle keys where the shift keys are on a regular keyboard (I have shift on a thumb key). Perhaps surprisingly, I have no trouble switching between my regular laptop keyboard and my weird thumb-shift ergonomic keyboard.

        Something that helps me is that my thumb keys stay the same across all of my layers. All of my modifier keys are on my left thumb, and space/enter/backspace are on my right thumb. So those are always available regardless of my layer changes.

        .-----------------------------------------.                .-----------------------------------------.
        | Tab  |   Q  |   W  |   E  |   R  |   T  |                |   Y  |   U  |   I  |   O  |   P  |  -   |
        |------+------+------+------+------+------|                |------+------+------+------+------+------|
        | Esc  |   A  |   S  |   D  |   F  |   G  |                |   H  |   J  |   K  |   L  |  ;   |  '   |
        |------+------+------+------+------+------|                |------+------+------+------+------+------|
        |Lower |   Z  |   X  |   C  |   V  |   B  |                |   N  |   M  |   ,  |   .  |   /  |Raise |
        |------+------+------+------+------+------+-----.   .------+------+------+------+------+------+------|
        | Ctrl |      |      |      | Alt  |Shift | Cmd |   |Enter |Space |Bksp  |      |      |      |      |
        '-----------------------------------------------'   '------------------------------------------------'
        

        Holding left shift gives me my “numbers and navigation” layer:

        .-----------------------------------------.  .-----------------------------------------.
        |      |      | PgUp |  Up  | PgDn |      |  |      |   7  |   8  |   9  |   :  |  -   |
        |------+------+------+------+------+------|  |------+------+------+------+------+------|
        |      | Home | Left | Down |Right | End  |  |   =  |   4  |   5  |   6  |   0  |      |
        |------+------+------+------+------+------|  |------+------+------+------+------+------|
        |      |      |      |      |      |      |  |   ,  |   1  |   2  |   3  |   .  |      |
        '-----------------------------------------'  '-----------------------------------------'
        

        Left hand is navigation; right hand is a numpad and some commonly-typed numeric symbols.

        Holding right shift gives me a punctuation layer:

        .-----------------------------------------.  .-----------------------------------------.
        |   `  |  !   |  @   |  #   |  $   |  %   |  |  ^   |  &   |  *   |      |      |  =   |
        |------+------+------+------+------+------|  |------+------+------+------+------+------|
        |      |      |      |  (   |   )  |      |  |      |   [  |   ]  |      |      |      |
        |------+------+------+------+------+------|  |------+------+------+------+------+------|
        |      |      |      |      |      |      |  |      |      |      |      |   \  |      |
        '-----------------------------------------'  '-----------------------------------------'
        

        Which is pretty familiar, apart from moving the brackets. I keep / on the base layer, so \ is the “raised” version of that. Similarly +/= sits on top of the base layer’s -/_.

        Holding right and left shift together gives me an “everything else” layer:

        .-----------------------------------------.  .-----------------------------------------.
        | Reset| F1   | F2   | F3   | F4   | F5   |  | F6   | F7   | F8   | F9   | F10  | Tog  |
        |------+------+------+------+------+------|  |------+------+------+------+------+------|
        |      | F11  | F12  |      |      |      |  | Mute | Vol- | Vol+ | Br-  | Br+  |      |
        |------+------+------+------+------+------|  |------+------+------+------+------+------|
        |      | BT 0 | BT 1 | BT 2 | BT 3 | BT 4 |  | |<<  | Play | >>|  |      |      |      |
        '-----------------------------------------'  '-----------------------------------------'
        

        BT keys toggle different bluetooth profiles, to switch between my laptop/phone/iPad. Tog persisently switches my base layer between qwerty and workman (on my laptop I use software remapping, so my keyboard sends qwerty, but on my iDevices I send workman keystrokes directly).

        1. 2

          I thought you used Workman layout?

          1. 2

            See the last sentence :)

            1. 2

              Comment too long

        2. 5

          For reference, I’m using this layout, on a Keyboardio Model 01, and make heavy use of layers and other productivity hacks like one-shot keys. My base layer has pretty much all the symbols I need, so I don’t activate other layers often. When I do, I usually do that for a very short time: either to input a single symbol, or a short sequence. In the first case, I use one-shot layer switching (so the layer remains active for one subsequent key only, and then automatically deactivates), so I don’t have to hold the layer change key. In the second case, I double-tap the layer switch key so the target layer remains locked until a third tap.

          The big trick here is that I don’t need to hold the layer key, which gives me a lot more freedom on how I lay things out, because when I don’t have to hold any key, I’m not contorting my hands or fingers in strange ways, either. I basically prefer sequences of keys over holding a combination of them. This lets me place the numbers on the same hand as the layer key that gets me there: I don’t have to hold the key! I just double tap it, input the number I want, and tap a third time. More tapping, but less holding, thus, less strain.

          Layers for me are just another kind of modifier, not very different from shift, alt, control, and the rest - except that layers are handled by my keyboard, rather than the operating system.

          1. 5

            I use them fairly extensively. There’s more to my layout that the web UI can’t encode (leader macros and the full expression of my macro keys), but that link has the major features.

            1. 3

              Do I read it correctly? - There are multiple Layouts on a single config (colemak, qwerty)? Years ago I tried learning the Neo 2 layout and the head work required to switch KBD layouts is already tough to me. But keeping two active at once… that’s beyond tough. What’s the benefit?

              Also the dedicated Emacs key get’s big love from me.

              1. 3

                Yeah there’s a qwerty fallback layer. It’s mostly for games that don’t let me remap them (there are a SURPRISING number of games that fall into this category). I don’t type in qwerty, I type in colemak mod-dh. Having a qwerty escape hatch can be uber convenient when you need it. :)

            2. 3

              I have programming symbols under Alt Gr almost identically to this image: http://aoeu.info/s/dvorak/images/svorak-A5.png

              1. 3

                I don’t (not yet at least). For years – however many has passed since Steve Losh’s Space Cadet post – I’ve been using two main customizations: shifts-as-parens and capslock-as-ctrl-and-esc. These two have travelled with me across many OSes/desktops (including Windows!), inspired me to write evscript when Wayland just became feasible on FreeBSD and later wf-mod2key when I settled on Wayfire as my compositor.

                But these aren’t layers. So. I technically have an Fn layer for super weird stuff on my current desktop keyboard’s firmware but that’s it. I am currently designing my “dream” keyboard, and I’m thinking about using layers, but I haven’t really found a super compelling use case. (e.g. I don’t type numbers anywhere near often enough to justify trying to break the num-row habit in favor of a layered numpad)

                Well, now that I thought about it, I should try using home-row keys as layer keys for augmenting my shift-paren habit with square and curly brackets. It’s actually kinda funny that the shift key is involved in both the standard chord for curlies and what I’m thinking of, but in this case the shift key would be the “tap” one rather than the “hold” one.

                1. 2

                  I am fully on your page with reducing finger travel. I actually ended up plucking a bunch of keys straight off my Ergodox EZ - moving functions to layers and tapdance configuration, highlighted with different per-key lighting per layer to illustrate key functions.

                  The function layer is not in use at the moment as the board does not have sufficient memory to do what I want with adaptive lighting there - and I don’t have the shortcuts control on my current desktop that I’d like.

                  1. 2

                    I’m currently using a relatively simple 34-key layer system: https://raw.githubusercontent.com/kkga/config/master/.local/share/34keys.png

                    Mostly inspired by the Seniply layout, but with a few tweaks. The alphas are qwerty for now, but I’m learning Colemak.

                    The mods on the layers are implemented as “one-shots”, so you can tap them, without holding, and chord with any key across other layers.

                    I have a few combos on the base layer, but found myself using their layered alternatives more, so I’ll likely get rid of them. I also have a Repeat key, which I use quite often for repeating modded chords on the base layer.

                    1. 2

                      I’m a fairly boring keyboard user. I have 1 other layer that rebinds keys useful for gaming on my Kinesis Advantage keyboard so that I can use them all with my left hand, freeing up the right hand for mouse/trackball.

                      1. 2

                        3 layers. First is obvious with some custom keys where the right alt, meta and ctrl key should be. Second layer is for my media and the function keys. 3rd layer is for controlling the backlight, which is basically off 24/7.

                        Most of my workflow is keybinds done with bspwm though.

                        1. 2

                          I have a Dygma keyboard. I use layers to map hjkl to arrow keys, some for media keys, and a couple of special mappings for browser shortcuts.

                          I have a very minimal customization.

                          1. 2

                            I have both layers and vimlike modes, all implemented with AutoHotKey.

                            • Right-alt (ralt, >! in AHK) is the window-switcher layer, so >!+s switches to spotify, >!+e switches to thunderbird, etc.
                            • Rctrl (>^) is the miscellaneous command mode. >^+d is write timestamped note, >^+D is show time in the tooltip, >^+U uppercases highlighted text, stuff like that.
                            • Normally >^+1234... inserts ¹²³⁴. Pressing the numpad - switches it to subscript mode, where it instead inputs ₁₂₃₄.
                            • Numpad . enters workshop mode, which has streamlined window switching and macros for running TLA+ and Alloy workshops.

                            I also have key combinations, where two keys pressed in sequence launches something. numpad1+t opens my TLA+ folder, numpad2+t launches the TLA+ toolbox, and numpad5+t opens my “therapy” notes.

                            For inserting math symbols I use AHK’s hotstring feature. Typing ;a puts in ∀, ;e is ∃, ;zed is ℤ, etc. I also have utility hotstrings, like ;em for and ;zoom for inserting my personal Zoom link.

                            I’m so jealous of the m1 macs because AHK is Windows-only ☹️

                            1. 2

                              I use a Keyboardio Model 01.

                              Because I use Dvorak, I have a layer for Qwerty, in case my wife needs to use the keyboard.

                              Then, of course, I have a layer for the extra keys, including imitating common Qwerty keyboard shortcuts like Ctrl+c, Ctrl+v, etc.

                              But my real innovation is having a layer that basically pastes the reverse of right side of the keyboard onto the left side, and it is activated by a chord on the left side.

                              What this means is that when I am using certain shortcut-heavy programs that also require mouse, like Blender, I can control the mouse with my right hand while handling nearly all keyboard work with my left hand. It saves me a lot of moving my right hand between the mouse and the keyboard.

                              1. 2

                                I use a 66% Clueboard keyboard so layers are essential for accessing keys that don’t have a hardware switch. In addition to that I have arrow keys on hjkl, My ~ key serves as Esc when tapped, ~ with shift and backtick on my Fn layer. I also have a macro layer that I can use to have the keyboard type common things like my name, email, phone, and address.

                                https://github.com/wezm/clueboard-rust-firmware/blob/d93425475c74667997a34b5233d76b0238c58375/src/layout.rs#L64

                                1. 2

                                  I’ve slightly modified Planck’s layout, which is really good to begin with. My most important deviations:

                                  • Ctrl naturally belongs to where Caps Lock usually is, no more finger strain.
                                  • So I put Escape in the lower left corner and press it with my palm. This “requires” an inverted bottom row when using ISO-profile key caps, for comfort.
                                  • Similarly, I replaced the right arrow key with Enter, and added back the right Shift key.
                                  • Then, the left arrow also had to go to a layer, because I needed AltGr for Czech and Polish.

                                  See QMK. These aren’t productivity hacks, just intuitive results of my needs. Note that I use Dvorak with the Qwerty layer–this swaps around a few keys. Ignore Colemak and Dvorak there altogether.

                                  I entered ortholinear keyboards with a Preonic, and its top row just felt universally wrong. It turned out my gut feeling was right. Having that row on Lower/Raise is great, as it minimizes hand/arm movement.

                                  I’m not as sure about my switch to low-profile Kailh Chocs, nor about split keyboards.

                                  1. 2

                                    I have a layer with thr f keys and ctrl Alt and delete on them and I don’t use it often.

                                    1. 2

                                      I use at least half a dozen layers on a daily basis. Link below to my layout, most of those layers have been in use for about a decade. Having modifiers on home row has become a necessity.

                                      One important thing that made this work, was unordered modifiers. That is, when you press a chord, it only matters what set of keys are included and what key was last, e.g. A+R+J is equivalent to R+A+J.

                                      I also made it so that I can “roll” between chords, i.e. when you release a key, only the keys that were pressed before it are included in the set of modifiers. This way, you can touch type almost normally.

                                      https://axelsvensson.com/layout1/

                                      1. 2

                                        I use an planck (40%), and got a pretty standard layout setup: one for numbers, one for symbols. The “cool” feature that I added was a way to change the base layout to “emulate” my base layout when the system is configured using a different layout. My mapping of choice is the “azerty AFNOR” (an optimized azerty layout, which is fairly uncommon). If I plug my keyboard to a QWERTY based computer, I simply press a key and can use my keyboard just like before. For example, here is my “QWERTY” layout:

                                        [_QWERTY] = LAYOUT_planck_grid(
                                                _______, KC_A,    KC_Z,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_MINS,
                                                _______, KC_Q,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_M   , US_SLAR,
                                                _______, KC_W,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_DOT,  KC_COMM, KC_COLN, KC_SCLN, KC_RSFT,
                                                _______, _______, _______, _______, _______, US_NUM , US_SYM , _______, _______, _______, _______, _______
                                        ),
                                        

                                        I have the same remapping done for “traditionnal” AZERTY (but it mostly acts on symbols). This has saved me a lot of time, and whenever someone connects to a VMWare server through the console, they ask me to type things in because I’m the only one that can type stuff in QWERTY without having to look at a cheatsheet !

                                        Another “fun” stuff I added (though it’s more due to the lack of keys I must admit!) is to put the Fn layout as a “sub-layout” of the number one. When I’m in the number layout, holding “F” will put me in the Fn layout, and replace each number with the corresponding Fn key. So pressing F8 is raise + f + 8. Easy to remember !

                                        1. 2

                                          question for all the layer-switchers here: how do you get the tap/hold speed right? doesn’t it really bother you when a key that would otherwise yield an immediate result has a delay? ( i haven’t been able to get past this minor annoyance )

                                          1. 3

                                            Yes, it bothers me. The only keys I use that have different usage on hold are escape (alt on hold) and the compose key (rctrl on hold). Even if you can type just fine, it not producing instant feedback on the screen is always annoying.

                                            1. 2

                                              I don’t. I used to have for example tap for space, hold for shift, but just could not find the timing to fully eliminate typos on that sort of thing. Eventually I decided that “almost never happens” wasn’t good enough for me.

                                              At this point I only use tapdance and layers - no tap/hold keys.

                                              For layer switching I never had single-tap lock via the standard qmk functions. I ran with hold-for-layer for a long time and then switched to a slightly custom solution where pressing two thumb cluster layer switchers engages locked mode. In this mode I stay in the last layer switched to, single tapping a different layer key to stay in that one. Tapping two layer keys again returns to the standard hold-to-get-layer-and-release-for-base-layer mode.

                                              Locked mode is excellent for extended number entry / navigation or gaming.

                                            2. 2

                                              By pressing one key with my left thumb I have access to:

                                              • Arrow keys
                                              • Home/End
                                              • Ctrl+C, Ctrl+V macros

                                              All without moving my fingers. Right hand gets access to a numpad.

                                              For the other layers, nothing really interesting. I have a toggle layer for qwerty so I don’t have to rebind keys in games. Also, media controls and compose key for accents. https://github.com/kiwec/qmk_firmware/blob/kiwec/keyboards/planck/keymaps/kiwec/keymap.c

                                              1. 1

                                                I have that keyboard and wrote my own keymap in qmk.

                                                It treats it as a 30% keyboard to minimise discomfort/reaching in my relatively small hands. The gaming layer retains use of the rest of the keys; I’m not sure on this basis how I could ever migrate to a physical 30% keyboard.

                                                It was originally Qwerty but is now based upon Colemak-DHm, which I quite like so far. The gaming layer keeps Qwerty so I don’t have to rebind everything I play. This works well except I can’t type very quickly in multiplayer any more: I either need to take a moment to context-switch back to Qwerty, or have to do a layer dance to first go to Colemak and then back again.

                                                I don’t love where Cmd is, or rather how it’s activated on the controls layer via oneshot.

                                                1. 1

                                                  True confessions: I “use” them when I realize I’ve unintentionally activated one and can’t access any of my macros :P

                                                  1. 1

                                                    I have right-level-shift-ESDF as my arrow keys and left-levelshift-plus-right-keys as full mouse emulation, to include the middle mouse button. This way I can navigate without removing my hands from the keyboard.

                                                    1. 1

                                                      What is a layer?

                                                      1. 3

                                                        On many keyboards there is a mechanism such that some or all of the keys can change behavior based on which “layer” is active. The layer can be changed by holding down a key or pressing a key. In this way, “shift” is somewhat like a layer change key—it swaps from the “lower-case” layer to the “upper-case” layer.

                                                        On very small keyboards, layers are required to generate numbers and F-keys because there aren’t enough physical buttons to represent them.