The Corne keyboard is a split keyboard with 3x6 column staggered keys and 3 thumb keys.
[[file:img/crkbd-phosphorous.jpg]]
The keyboard can be programmed using the [[https://qmk.fm/][QMK]] firmware for the [[https://github.com/foostan/crkbd][crkbd]]. With the help of the [[https://github.com/mihaiolteanu/mugur][mugur]] interface 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 and a wide range of examples.
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 first row, with commonly used brackets on the third 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 and mouse keys (when enabled) on the right. There is a QMK reset key on each half of the keyboard.
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-outer (=L30=) and the =hypm= layer can be activated with Left-thumb-outer, right-thumb-outer (=R32=) 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)
this will create a =rules.mk= file with some specifics for the [[https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd][Corne Keyboard (CRKBD)]]
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_HUE_STEP 8
#define RGB_MATRIX_SAT_STEP 8
#define RGB_MATRIX_VAL_STEP 8
#define RGB_MATRIX_SPD_STEP 10
#+END_SRC
Disable the animations you don't want/need. You will need to disable a good number of these because they take up a lot of space. Disable until you can successfully compile your firmware.
see also [[http://www.keyboard-layout-editor.com/##@_name=zzkt%20-%20alphalikes&author=https%2F:%2F%2F%2F%2Fgithub.com%2F%2Fzzkt%2F%2Fcrkbd¬es=layers%2F:%0A-%200%20default%0A-%201%20numeric%0A-%202%20move%0A-%203%20emacs%0A-%204%20hypm%0A-%205%20qmik&plate:false%3B&@_x:3&t=%23000000%0A%0A%23dd3c84%3B&=%0A%0A%23%0A%0A%0A%0A%0A%0A%0AE&_x:7%3B&=%0A%0A*%0A%0A%0A%0A%0A%0A%0AI%3B&@_y:-0.9&x:2&t=%23000000%0A%0A%23dd3c84%0A%231c937f%3B&=%0A%0A%2F@%0A%E2%96%B2%0A%0A%0A%0A%0A%0AW%3B&@_y:-1&x:4&t=%23000000%0A%0A%23dd3c84%3B&=%0A%0A$%0A%0A%0A%0A%0A%0A%0AR&_x:5%3B&=%0A%0A%2F&%0A%0A%0A%0A%0A%0A%0AU&_x:1&t=%23000000%0A%0A%23dd3c84%0A%0A%0A%0A%0A%23dd3c84&fa@:0&:0&:4&:0&:0&:0&:0&:4%3B%3B&=%0A%0A%2F_%0A%0A%0A%0A%0A-%0A%0AO%3B&@_y:-0.9000000000000001&x:5&t=%23000000%0A%0A%23dd3c84&f:3%3B&=%0A%0A%25%0A%0A%0A%0A%0A%0A%0AT&_x:3&f:3%3B&=%0A%0A%5E%0A%0A%0A%0A%0A%0A%0AY%3B&@_y:-0.8999999999999999&f:3%3B&=%0A%0A~%0A%0A%0A%0ATab&_t=%23000000%0A%0A%23dd3c84%0A%231c937f&fa@:0&:0&:0&:2%3B%3B&=%0A%0A!%0AM-v%0A%0A%0A%0A%0A%0AQ&_x:11&t=%23000000%0A%0A%23dd3c84%0A%0A%0A%0A%0A%23dd3c84%3B&=%0A%0A+%0A%0A%0A%0A%0A%2F=%0A%0AP&_t=%23000000&a:7%3B&=Bksp%3B&@_y:-0.30000000000000004&x:3&t=%23000000%0A%0A%23dd3c84%0A1c937f&a:4&f:3%3B&=%0A%0A3%0A%E2%96%BA%0A%0A%0A%0A%0A%0AD&_x:7&f:3%3B&=%0A%0A8%0A%E2%96%BC%0A%0A%0A%0A%0A%0AK%3B&@_y:-0.8999999999999999&x:2&f:3%3B&=%0A%0A2%0A%E2%96%BC%0A%0A%0A%0A%0A%0AS&_x:1&t=%23000000%0A%0A%23dd3c84%0A%231c937f&f:3%3B&=%0A%0A4%0AC-e%0A%0A%0A%0A%0A%0AF&_x:5&t=%23000000%0A%0A%23dd3c84%0A1c937f&f2:0%3B&=%0A%0A7%0A%E2%96%B2%0A%0A%0A%0A%0A%0AJ&_x:1%3B&=%0A%0A9%0A%E2%96%BA%0A%0A%0A%0A%0A%0AL%3B&@_y:-0.9000000000000001&x:5&t=%23000000%0A%0A%23dd3c84%3B&=%0A%0A5%0A%0A%0A%0A%0A%0A%0AG&_x:3&t=%23000000%0A%0A%23dd3c84%0A1c937f&fa@:0&:0&:0&:1%3B%3B&=%0A%0A6%0A%E2%97%80%EF%B8%8E%0A%0A%0A%0A%0A%0AH%3B&@_y:-0.9000000000000001&t=%23000000%0A%0A%23dd3c84%0A%231c937f&f:3%3B&=%0A%0A0%0AC-a%0A%0A%0A%0A%0A%0ACtrl&=%0A%0A1%0A%E2%97%80%EF%B8%8E%0A%0A%0A%0A%0A%0AA&_x:11&t=%23000000%0A%0A%23dd3c84&fa@:0&:0&:0&:1&:0&:0&:0&:0&:0&:4%3B%3B&=%0A%0A0%0A%0A%0A%0A%0A%0A%2F:%0A%2F%3B&_f:2%3B&=%0A%0A%E2%86%B5%0A%0A%0A%0A%0A%0A%22%0A'%20(LT%202)%3B&@_y:-0.2999999999999998&x:3&t=%23000000%0A%0A%23dd3c84%0A%231c937f&f:3&fa@:0&:0&:0&:2%3B%3B&=%0A%0A%0AM%20%3E%0A%0A%0A%0A%0A%0AC&_x:7&t=%23000000&a:5&fa@:0&:0&:0&:2&:0&:0&:6%3B%3B&=%3C%0A%0A%0A%0A%0A%0A,%3B&@_y:-0.8999999999999999&x:2&t=%23000000%0A%0A%23dd3c84%0A%231c937f&a:4%3B&=%0A%0A%0AC-v%0A%0A%0A%0A%0A%0AX&_x:1&t=%23000000%0A%0A%23dd3c84%3B&=%0A%0A%7B%0A%0A%0A%0A%0A%0A%0AV&_x:5%3B&=%0A%0A%7D%0A%0A%0A%0A%0A%0A%0AM&_x:1&t=%23000000&a:5%3B&=%3E%0A%0A%0A%0A%0A%0A.%3B&@_y:-0.8999999999999999&x:5&t=%23000000%0A%0A%23dd3c84&a:4%3B&=%0A%0A%5B%0A%0A%0A%0A%0A%0A%0AB&_x:3%3B&=%0A%0A%5D%0A%0A%0A%0A%0A%0A%0AN%3B&@_y:-0.9000000000000004&t=%23000000&a:7%3B&=Shift&_t=%23000000%0A%0A%23dd3c84%0A%231c937f&a:4&fa@:0&:0&:6&:2%3B%3B&=Z%0A%0A%60%0AM%20%3C&_x:11&t=%23000000%0A%0A%23dd3c84&f:3%3B&=%0A%0A%7C%0A%0A%0A%0A%0A%0A%3F%0A%2F%2F&_t=%23dd3c84&f:2%3B&=(MO%203)%0A%0A%0A%0A%0A%0A(MO%205)%3B&@_y:-0.19999999999999973&x:3.5%3B&=(MO%205)%0A%0A%0A%0A%0A%0A(MO%203)&_x:6&t=%23000000%3B&=(TG%201)%3B&@_r:15&rx:4.5&ry:4.1&y:-0.9999999999999996&f:3%3B&=lapo%3B&@_r:30&rx:5.4&ry:4.3&y:-1.5&x:0.09999999999999964&f:2&h:1.5%3B&=(G%20spc)%3B&@_r:-30&rx:9.6&y:-1.5&x:-1.0999999999999996&f:3&h:1.5%3B&=Enter%3B&@_r:-15&rx:10.5&ry:4.1&y:-1.0999999999999996&x:-1&t=&fa@:2%3B%3B&=rapc][KLE layers (pt.1)]] and [[http://www.keyboard-layout-editor.com/##@_name=zzkt%20-%20emacs&author=https%2F:%2F%2F%2F%2Fgithub.com%2F%2Fzzkt%2F%2Fcrkbd¬es=layers%2F:%0A-%200%20default%0A-%201%20numeric%0A-%202%20move%0A-%203%20emacs%0A-%204%20hypm%0A-%205%20qmik&plate:false%3B&@_x:3&a:7%3B&=C-x%200&_x:7&t=%23000000%0A%0A%23dd3c84&a:4%3B&=%0A%0AH-i%3B&@_y:-0.9&x:2&t=%23000000&a:7%3B&=%3B&@_y:-1&x:4%3B&=C-x%202&_x:5%3B&=&_x:1&t=%23000000%0A%0A%23dd3c84%0A%0A%0A%0A%0A%23dd3c84&a:4%3B&=%0A%0AH-i%20o%0A%0A%0A%0AC-M%20o%3B&@_y:-0.9000000000000001&x:5&t=%23000000&a:7%3B&=C-x%203&_x:3%3B&=C-x%204%20t%3B&@_y:-0.8999999999999999&t=%23000000%0A%0A%23dd3c84&a:4%3B&=esc&_t=%23000000&a: