Charybdis is an ergonomic keyboard using a split 4x6 layout (or 3x5) with 5+3 thumb keys and integrated trackball.
[[file:img/charybdis-4x6.jpg]]
The keyboard can be programmed using [[https://qmk.fm/][QMK]] firmware for the [[https://github.com/Bastardkb/charybdis][charybdis]] (which currently requires the CNano branch of QMK) With the help of [[https://github.com/mihaiolteanu/mugur][mugur]] (and org-mode) this file can be used as a literate config to generate a keymap and the relevant build files for the QMK firmware…
For reference, comparison and reading the [[https://github.com/manna-harbour/qmk_firmware/blob/crkbd/keyboards/crkbd/keymaps/manna-harbour/readme.org][Crkbd Keymap by Manna Harbour]] and [[https://github.com/qmk/qmk_firmware/tree/master/users/drashna][drashna]] provide good examples of detailed configs, and the [[https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps][QMK tree]] has further specifics with a wide range of examples.
#+caption: alphanumeric, movement and mouse layers
This config uses a mulit-layer qwerty layout which has emerged from a combination of writing and programming using emacs (and emacs style keybindings) on macos and linux. The numeric layer has numbers on the home row and shifted symbols on the row above, with commonly used brackets on the lowest row symmetrically between sides. The emacs layer(s) provide both command and prefix keys. The movement layer provides arrows (as WASD and HJKL) and jump keys on the left. When the mouse layer is active the keys above the trackball can be used as mouse buttons. There is a QMK reset key on each half of the keyboard.
* specific mappings
Details of keyboard layout, layers, macros and general confusion can be found in the [[https://docs.qmk.fm/#/][QMK docs]]
*Layers*
- qwerty and modifiers
- numbers, symbols & brackets
- movement. arrows & jump
- emacs layers
- mouse layer
*Trackball*
- mounted on the right half
- uses keys above the trackball as mouse buttons (i.e. =M=, =comma=, and =dot= with qwerty layout)
- sniping, drag_scroll, etc
*Modifiers*
- Left thumb (base layer) Alt/Meta, space and GUI (held) or space (tap) on top row, with Emacs layer and =KC_LAPO= below
- Right thumb (base layer) Tap toggle numeric layer, Enter (tap) or Right GUI (held) on top row and =KC_RAPC= below
The =KC_LAPO= key is Left Alt when held and =(= when tapped, it can be used as =Meta=. The =KC_RAPC= key is Right Alt when held and =)= when tapped, it can be used for accents and non-ascii characters with the international macOS input sources.
The =emacs= layer is activated with Left-thumb (=k45=) and the =hypm= layer can be activated with (=k80=) and can be used to provide the =H-= prefix bindings defined in =.emacs= The =hyper= key seen by emacs can be mapped to =KC_RGUI= rather than the =KC_HYPR= modifier combination (see also the “[[https://github.com/qmk/qmk_firmware/issues/2179][the infamous Apple Fn key]]” for compatibility)
*QMK Reset*
- Left. =k45= & =k30=
- Right. =k70= & =k80=
To create a new layer, start with a blank layer.
#+BEGIN_SRC emacs-lisp :tangle no :results silent :eval no
("blank"
--- --- --- --- --- --- --- --- --- --- --- ---
--- --- --- --- --- --- --- --- --- --- --- ---
--- --- --- --- --- --- --- --- --- --- --- ---
--- --- --- --- --- --- --- --- --- --- --- ---
--- --- --- --- --- -x-
--- --- --- -x-)
#+END_SRC
Details of the =mugur= keycode naming can be found in the documentation of =mugur--symbol=
#+BEGIN_SRC emacs-lisp :tangle no :results silent
(find-function 'mugur--symbol)
#+END_SRC
A complete keymap can be defined within =mugur-mugur= which will generate the required files to build the firmware.
#+name: keymap
#+BEGIN_SRC emacs-lisp :tangle no :results silent :eval query