The current Cybershard layout ★
Contents
This is the keyboard layout I’m using for my custom keyboard that I generated, printed, and hand-wired. It’s a minimalistic keyboard of 35 keys and features an integrated trackball on the right-hand side.
The keyboard layout started out as a direct copy of the T-34 keyboard layout, with some small modifications from the 34-key keyboard T-34 was designed for:
- An extra two keys on the left-hand side, in the ring and middle finger columns.
- Removed the second thumb key on the right-hand side.
- Accommodation for mouse keys and trackball handling.
While the layout has diverged since then, the design philosophy from original T-34 post still holds true and I recommend it as it may explain why the layout looks like it does.
Legend
I use quite a number of special features for the keys and I’ve tried to color code according to the above legend.
Layers
Layers are super important for smaller keyboards and I use them a ton.
Base
- The repeat key is used to output the last pressed key.
- I shift keys using auto shift (see long press) and CAPSWORD.
-
The letters
Z
andQ
, together with a bunch of other keys, are on combos. -
The keys for
F2
,F12
andFUN
are just extras and aren’t in a comfortable enough position to warrant anything more common.
Swedish overlay
When I want to write Swedish I activate this layer that replaces ()_
with åäö
, or I use combos from any layer.
Symbols
I typically use combos to output symbols (following the same layout pattern as the symbols layer).
The symbols layer is mostly used to roll symbol pairs like {}
or #[
.
Some common symbol sequences (like ->
, !=
, or ```
) exists as combos and others as long press.
Numbers
J
) turn off NUMWORD.
While I can activate the number layer persistently (using leader sequences) I typically use combos for single digits (like 0
), or NUMWORD for larger numbers (like 1984
).
NUMWORD makes the number layer smart, so it will deactivate when certain keys are pressed.
It’s used to type numbers in text or code and for relative movement in Neovim, where 17J
would move 17 lines down and then turn off the number layer.
Jumping directly to a line in Neovim with 12G
is also made convenient.
If I want to enter the layer without it turning off I can either use leader sequences to activate it persistently or hold the NUMWORD combo (hold both thumbs).
The layer won’t release until both thumb keys are released, so Space
can be tapped with the left thumb without leaving the number layer.
@u
is there to easily activate macros in Neovim. For example 7@u
in the number layer would run the u
macro 7 times and then turn off NUMWORD.
Function keys
- The function keys follow the same layout as the numbers layer.
-
The trackball
DPI
can be lowered and raised at runtime.
Workspace layer
Gui
modifier.
This is used for all window and workspace management in xmonad. Some common operations are also on the navigation layer.
Auto shift works and can used to send a window to another workspace (Gui
+ Shift
+ 2
).
Windows layer
Alt
modifier.
This is purely to enable window switching using Alt-Tab
and Ctrl-Alt-Tab
, without releasing Alt
.
Mouse layer
I generally prefer to use the navigation layer, where the mouse buttons are on the left side, but in some cases I’d like to only use my right hand.
Special characters
The dead keys add diacritic to any letter. For example, to get é
you can use the dead key ´
then e
, and the operating system will merge them together.
(É
also exists as a combo.)
Modifiers
I typically use long press for shift and combos for other modifiers, this layer is a fallback for when those aren’t enough (the layer is mostly used for Right Alt
).
Gaming layer
I’m not a heavy gamer by any means but this layer allows me to play Core Keeper with my kid. By necessity this layer disables auto shift.
Combos
Combos is another fantastic tool that I (ab)use a lot. Simply put it allows you to press multiple keys at once and acts as another key—very useful for smaller layouts.
Neighbour combos
These combos are made by keys next to each other, either horizontally (pressed with two fingers) or vertically (pressed with one finger in the middle of two keys).
-
Some combos have a separate hold behaviour; for instance holding
Escape
activates the symbols layer, allowing me to output[]
easily. -
vsplit
splits a window vertically in Neovim andhsplit
splits it horizontally, andClose Window
closes a window in Neovim (<C-w>q
). -
Clear
resets all states; sets the base layer, releases modifiers, stops CAPSWORD and NUMWORD, and clears other persistent states. -
Ctrl
+Shift
+M
is the shortcut to mute/unmute in Teams.
-
SWE
activates the Swedish layer, and if prefixed with()_
it will replace that withåäö
and vice versa. So for example if I typedhall(
I would pressSWE
to gethallå
, with the Swedish layer activated. -
Ctrl W
is used to close tabs in Firefox.
-
Save Neovim
is a 4-key combo that saves the buffer in Neovim.
Split combos
These split combos uses the ring and index finger.
"
and '
.
Alt
on the left combo and holding the right combo activates the windows layer (with implicit Alt
).
Combos over keyboard halfs
-
Tapping
T
+A
once activates CAPSWORD, tapping again makes it persistent (CAPS LOCK
), and a third tap to deactivateCAPS LOCK
. -
Tapping
Space
+E
activates NUMWORD and tapping them again activates the number layer persistently.
The repeat key works with the above, making them easier to double-tap.
-
Swaps
_
and-
.
- Access the specials layer with the ring fingers.
Thumb key combos
I have a bunch of 2-key thumb
+ key
combos:
Space
and another key.
E
and another key.
The logic here is that same-side thumb
+ key
= symbol
and opposite-side thumb
+ key
= digit
, following the placements of the numbers, symbols and swedish layers. They’re used if I want to just type a single character, without having to activate a layer first.
FUN
and another key.
I have similar combos for the function keys.
QMK boot
The keycode QMK_BOOT
enters boot mode for the microcontroller connected via USB, making it easy to update the keymap on the keyboard.
These two 5-key combos (one for each half) are almost impossible to trigger accidentally while being easily accessible.
Additional features
While layers and combos are the two main features I use, QMK has a lot of other nifty features (and you roll your own implementation of them too).
Long press
Most keys have a different behaviour when tapped compared to a long press. Most commonly I use this to produce shifted keys (called auto shift).
So tapping the A
key will output a
as normal and if it it A
will appear instead.
There are a bunch of special cases as well (many on top of combos):
Tap | Long press |
---|---|
_ < > / \ # |
Double, e.g __ |
" ' = ` 0 . |
Triple, e.g """ |
| & = |
Double with spaces, e.g || |
! |
!= (with spaces) |
? |
{:?} |
# |
{:#?} |
% |
%{} |
( [ { |
Close and move cursor between |
@ |
@u (paired with qu combo for Neovim macro execution) |
Leader sequences
I use the combo l
+ )
as the leader key.
This will wait for a sequence of key presses (in contrast to combos where keys must be pressed at the same time).
I use this with mnemonics for rarely used outputs:
Leader sequence | Action |
---|---|
l + ) , c |
Caps lock |
l + ) , s |
Swedish input in Linux (mapped in xmonad) |
l + ) , t , n |
Toggle Number layer |
l + ) , t , s |
Toggle Symbols layer |
l + ) , t , f |
Toggle Function layer |
l + ) , t , c |
Toggle Caps lock escape swap |
l + ) , Esc |
Ctrl Shift Escape |
CAPSWORD
CAPSWORD is a “smart caps lock”. It works like a regular caps lock, except it automatically turns off after certain keys are typed (most commonly space).
It will not turn off on letters, numbers, _
-
Backspace
and the Repeat
keys.
NUMWORD
NUMWORD is a “smart layer”. It’s similar to CAPSWORD, except it activates and then turns off the numbers layer instead of caps lock.
It will not turn off on these keys: 0-9
%
/
+
*
-
_
.
,
:
=
x
Backspace
Enter
and the Repeat
keys.
Repeat key
The repeat key simply repeats the previous key. So to type fall
I can type f
a
l
Repeat
, using four different fingers instead of pressing l
twice. It can also repeat things like Ctrl-c
or Delete
, and unlike regular keys that use auto shift the Repeat
key can be held.
Trackball
The trackball is normally configured to move the mouse as a regular trackball.
There are different modes that alters the behavior of the trackball:
-
Lower the DPI when
Space
or_
are held (the mouse moves slower when the navigation layer or the mouse layer are active). -
Raise the DPI when the
MOD
combo is held (the mouse moves faster). -
Scroll instead of moving the mouse when the
SYM
combo is held.
More info
-
Read the T-34 series for the design process and motivations of my other keyboard layout (it’s the same layout with minor refinements and additions).
-
See the post Building my ultimate keyboard for how I designed and built the keyboard I’m using this layout with.
-
For implementation details and the most up-to-date reference check out the layout’s QMK source code.
-
Copied the T-34 layout and adapted it for the new keyboard by adding a mouse layer, remove the shortcut layer, and changed the activation of the specials layer.
-
Moved
-
to an angled combo, moving theWIN
key to the top row, and move%
to the home-row and!
to the bottom row. -
Reworked the mouse layer and use a more advanced triggering mechanism to be more explicit about when the layer is turned on and off.
-
-
Moved
-
back to it’s original position and placed%
on the angled combo. -
Experimental functionality to swap
-
and_
for the languages that usekebab-case
. - Removed the mouse layer and placed mouse buttons on the navigation layer.
-
Moved
-
Reworked the navigation layer to keep the original positions for
PgUp
,PgDn
, andTab
s. To allow this I moved the mouse click to index finger and demoted theup
/down
to the top row. -
-
Reworked the navigation layer to be more focused on two hands on the board. The idea is to use better placed keys on the right-hand side instead of cramming in too much on the left. Moved
PgUp
andHome
to the right side and it’s enough to use the arrow keys on the right. (The secondary navigation layer exists to enable arrow keys on the left side.) -
Added mouse button combos on the right-hand side so in a pinch I can operate the mouse with one hand.
-
-
-
Removed mouse button combos from the right-side and place them on a separate layer instead (to keep the shift combo in the regular place).
-
Add
Gui
+,
/.
for xmonad master window management to the navigation layer, movingCtrl
+A
to the home-row once again.
-
-
Added the gaming layer.