KC_HYPR
This commit is contained in:
parent
af52e51a71
commit
834a675c44
6 changed files with 2466 additions and 0 deletions
354
README.org
Normal file
354
README.org
Normal file
|
@ -0,0 +1,354 @@
|
|||
# -*- mode: org; coding: utf-8; -*-
|
||||
#+SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#+author: nik gaffney <nik@fo.am>
|
||||
#+title: QMK config for crkbd
|
||||
|
||||
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.
|
||||
|
||||
* general principles
|
||||
|
||||
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 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.
|
||||
|
||||
* 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 on the left, mouse keys on the right
|
||||
- emacs layers.
|
||||
- qmk control layer.
|
||||
|
||||
*Modifiers*
|
||||
- Left thumb (base layer) Emacs layer, =KC_LAPO,= and GUI (held) or space (tap)
|
||||
- Right thumb (base layer) Enter, =KC_RAPC,= and Toggle numeric layer
|
||||
|
||||
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 is 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. =L20= & =L30=
|
||||
- Right. =R25= & =R05=
|
||||
|
||||
To create a new layer, start with a blank layer.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle no :results silent :eval no
|
||||
("blank"
|
||||
--- --- --- --- --- --- --- --- --- --- --- ---
|
||||
--- --- --- --- --- --- --- --- --- --- --- ---
|
||||
--- --- --- --- --- --- --- --- --- --- --- ---
|
||||
--- --- --- --- --- --- )
|
||||
#+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
|
||||
(helpful-callable '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
|
||||
(require 'mugur)
|
||||
|
||||
(let ((mugur-qmk-path "~/qmk_firmware")
|
||||
(mugur-keyboard-name "crkbd")
|
||||
(mugur-layout-name "LAYOUT_split_3x6_3")
|
||||
(mugur-keymap-name "zzkt4")
|
||||
(mugur-tapping-term 175))
|
||||
|
||||
(mugur-mugur
|
||||
'(("base"
|
||||
tab q w e r t y u i o p bspace
|
||||
C a s d f g h j k l ?\; (LT move ?\')
|
||||
S z x c v b n m ?\, dot ?\? (MO qmik)
|
||||
(MO emacs) lapo (G space) ent rapc (TG numeric))
|
||||
|
||||
("numeric"
|
||||
~ ?\! ?\@ ?\# ?\$ ?\% ?\^ ?\& ?\* - = bspace
|
||||
0 1 2 3 4 5 6 7 8 9 0 (LT move ent)
|
||||
S --- ?\< ?\{ ?\[ ?\( ?\) ?\] ?\} ?\> | (MO emacs)
|
||||
(TG qmik) C-M --- --- S (TG numeric))
|
||||
|
||||
("move"
|
||||
--- M-v up --- --- --- --- --- --- --- --- ---
|
||||
C-a left down right C-e --- --- --- --- --- --- ---
|
||||
--- M-< C-v M-> --- --- --- --- --- --- --- ---
|
||||
--- --- --- --- --- --- )
|
||||
|
||||
("emacs"
|
||||
esc --- --- (C-x 0) (C-x 2) (C-x 3) (C-x 4 t) --- --- --- --- ---
|
||||
--- --- M-% --- --- (M-x "gtd" ent) (C-x b) --- --- "λ" --- ---
|
||||
reset --- M-x C-c --- ?\( ?\) (M-x "magit" ent) --- --- --- ---
|
||||
--- --- (H-i e) (C-x 8) --- (MO hypm))
|
||||
|
||||
("hypm"
|
||||
--- --- --- --- --- --- --- --- H-i (H-i o) (H-i l) ---
|
||||
--- --- --- H-d --- --- --- --- --- --- --- ---
|
||||
--- --- --- --- --- --- --- H-m (H-m s) --- --- ---
|
||||
--- --- --- --- --- --- )
|
||||
|
||||
("qmik"
|
||||
--- rgb_tog rgb_mod --- --- --- --- --- --- --- --- reset
|
||||
rgb_sad rgb_vad rgb_hud --- --- --- --- --- --- --- --- ---
|
||||
rgb_sai rgb_vai rgb_hui --- --- --- --- --- --- --- S ---
|
||||
--- --- --- --- --- --- )
|
||||
)))
|
||||
#+END_SRC
|
||||
|
||||
** keymap.c
|
||||
|
||||
This will generate a =keymap.c= file with =org-babel-tangle= and should be run before the elisp code block for the keymap described above.
|
||||
|
||||
#+BEGIN_SRC c :tangle keymap.c
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "version.h"
|
||||
#+END_SRC
|
||||
|
||||
=mugur= will write the keymap and only overwrite the region between these comments.
|
||||
|
||||
#+BEGIN_SRC c :tangle keymap.c
|
||||
// START-MUGUR-REGION
|
||||
// END-MUGUR-REGION
|
||||
#+END_SRC
|
||||
|
||||
add an fm logo animation…
|
||||
|
||||
#+BEGIN_SRC c :tangle keymap.c
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
// 'fm_logo-128x32', 32x128px
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM fm_logo[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x78, 0x78, 0x78, 0x78, 0x38, 0x30, 0x60, 0xd0, 0xc0, 0x80,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x83, 0xcf, 0xfe, 0xfc, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0c, 0x0e, 0x1e, 0x1e, 0x3e, 0x7e, 0xfe, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x78, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0xfb,
|
||||
0xff, 0xff, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f, 0xff, 0xff,
|
||||
0x7f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1e, 0x1e, 0x1c, 0x1c, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x30, 0x60, 0x60, 0x60, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfe, 0xff, 0xf8,
|
||||
0xe0, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0f, 0xff, 0xff, 0xff, 0x1f, 0x0f, 0x07,
|
||||
0x07, 0x07, 0x03, 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0e, 0x1c, 0xf8,
|
||||
0xfc, 0xfe, 0x6f, 0xe7, 0xf3, 0xf9, 0xf9, 0xf9, 0xf9, 0xf3, 0xe3, 0x07, 0x1e, 0xfc, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x07, 0x0f, 0x1c, 0x38, 0x33, 0x33, 0x77, 0x77, 0x33, 0x33, 0x39, 0x1c, 0x0f, 0x07, 0x01, 0x00
|
||||
};
|
||||
oled_write_raw_P(fm_logo, sizeof(fm_logo));
|
||||
}
|
||||
|
||||
// rotate the OLEDs
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (isLeftHand) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return OLED_ROTATION_90;
|
||||
}
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
render_logo();
|
||||
oled_scroll_set_speed(5);
|
||||
oled_scroll_left();
|
||||
}
|
||||
#endif
|
||||
#+END_SRC
|
||||
|
||||
turn on (or off) debug info (check that =CONSOLE_ENABLE= is set accordingly in =rules.mk= )
|
||||
|
||||
#+BEGIN_SRC c :tangle keymap.c
|
||||
void keyboard_post_init_user(void) {
|
||||
debug_enable=true;
|
||||
//debug_matrix=true;
|
||||
debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** rules.mk
|
||||
|
||||
this will create a =rules.mk= file with some specifics for the [[https://github.com/qmk/qmk_firmware/blob/c66df1664497546f32662409778731143e45a552/keyboards/crkbd/readme.md][Corne Keyboard (CRKBD)]]
|
||||
|
||||
#+BEGIN_SRC makefile :tangle rules.mk
|
||||
BOOTLOADER = atmel-dfu # Elite-C
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = yes # WS2812 # per-key RGB and underglow
|
||||
|
||||
UNICODE_ENABLE = yes
|
||||
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no # use mouse keys or not
|
||||
CONSOLE_ENABLE = no # debug info
|
||||
#+END_SRC
|
||||
|
||||
** config.h
|
||||
|
||||
This will generate a =config.h= file
|
||||
|
||||
#+BEGIN_SRC c++ :tangle config.h
|
||||
#define EE_HANDS
|
||||
#+END_SRC
|
||||
|
||||
taping timing and tap/hold (as seen in the [[https://beta.docs.qmk.fm/using-qmk/software-features/tap_hold][QMK docs]])
|
||||
|
||||
#+BEGIN_SRC c++ :tangle config.h
|
||||
#define TAPPING_TERM 175
|
||||
#define COMBO_TERM 300
|
||||
#define RETRO_TAPPING
|
||||
#+END_SRC
|
||||
|
||||
Unicode input method (tangle as required)
|
||||
|
||||
#+BEGIN_SRC c :tangle config.h
|
||||
#define UNICODE_SELECTED_MODES UC_MAC
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC c :tangle no
|
||||
#define UNICODE_SELECTED_MODES UC_LNX, UC_MAC
|
||||
#+END_SRC
|
||||
|
||||
for VIA compatibility (if needed)
|
||||
|
||||
#+BEGIN_SRC c :tangle config.h
|
||||
#define VENDOR_ID 0x4653
|
||||
#define PRODUCT_ID 0x0001
|
||||
#+END_SRC
|
||||
|
||||
RGB matrix & lighting effects
|
||||
|
||||
#+BEGIN_SRC c :tangle config.h
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#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.
|
||||
|
||||
#+BEGIN_SRC c :tangle config.h
|
||||
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
/* #define DISABLE_RGB_MATRIX_BREATHING */
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
/* #define DISABLE_RGB_MATRIX_TYPING_HEATMAP */
|
||||
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#+END_SRC
|
||||
|
||||
Default colours & modes
|
||||
|
||||
#+BEGIN_SRC c :tangle config.h
|
||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP
|
||||
#define RGB_MATRIX_STARTUP_HUE 128 // HSV_CYAN
|
||||
#define RGB_MATRIX_STARTUP_SAT 255
|
||||
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
|
||||
// #define RGB_MATRIX_STARTUP_SPD
|
||||
#endif
|
||||
#+END_SRC
|
||||
|
||||
** build (generate, compile and flash cycle)
|
||||
|
||||
first tangle this file
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle no :results silent
|
||||
(org-babel-tangle)
|
||||
#+END_SRC
|
||||
|
||||
then write the keymap as defined above
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :noweb yes :tangle no :results silent
|
||||
<<keymap()>>
|
||||
#+END_SRC
|
||||
|
||||
then compile and/or write to the keyboard
|
||||
|
||||
#+name: qmk
|
||||
#+BEGIN_SRC shell :dir ~/qmk_firmware :wrap SRC text :tangle no
|
||||
qmk compile -kb crkbd -km zzkt4
|
||||
#+END_SRC
|
||||
|
||||
#+name: qmk
|
||||
#+BEGIN_SRC shell :dir ~/qmk_firmware :wrap SRC text :tangle no
|
||||
qmk flash -km zzkt4 -bl dfu
|
||||
#+END_SRC
|
||||
|
||||
or flash one side at a time…
|
||||
|
||||
#+name: qmk
|
||||
#+BEGIN_SRC shell :dir ~/qmk_firmware :wrap SRC text :tangle no
|
||||
qmk flash -km zzkt4 -bl dfu-split-left
|
||||
#+END_SRC
|
||||
|
||||
#+name: qmk
|
||||
#+BEGIN_SRC shell :dir ~/qmk_firmware wrap SRC text :tangle no
|
||||
qmk flash -km zzkt4 -bl dfu-split-right
|
||||
#+END_SRC
|
||||
|
||||
* illustrative
|
||||
|
||||
#+caption: blank crkbd layout
|
||||
[[file:img/crkbd-default-layer.svg]]
|
||||
|
||||
* further
|
||||
|
||||
- [[https://config.qmk.fm/#/crkbd/rev1/common/LAYOUT_split_3x6_3][QMK Configurator]] (for crkbd)
|
||||
- [[https://josef-adamcik.cz/electronics/corne-keyboard-build-log.html][Build log - Josef Adamčík]]
|
||||
- [[https://thomasbaart.nl/2018/11/26/corne-keyboard-helidox-build-log/][Build log - Thomas Baart]]
|
||||
- [[https://en.wikipedia.org/wiki/Keyboard_layout][Keyboard Layouts]] (wikipedia)
|
69
config.h
Normal file
69
config.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
// START-MUGUR-REGION
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 175
|
||||
#define COMBO_TERM 300
|
||||
#define LEADER_TIMEOUT 300
|
||||
#define LEADER_PER_KEY_TIMING
|
||||
#define COMBO_COUNT 0
|
||||
#define FORCE_NKRO
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
|
||||
// END-MUGUR-REGION #define UNICODE_SELECTED_MODES UC_MAC
|
||||
|
||||
#define VENDOR_ID 0x4653
|
||||
#define PRODUCT_ID 0x0001
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#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
|
||||
|
||||
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
/* #define DISABLE_RGB_MATRIX_BREATHING */
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
/* #define DISABLE_RGB_MATRIX_TYPING_HEATMAP */
|
||||
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP
|
||||
#define RGB_MATRIX_STARTUP_HUE 128 // HSV_CYAN
|
||||
#define RGB_MATRIX_STARTUP_SAT 255
|
||||
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
|
||||
// #define RGB_MATRIX_STARTUP_SPD
|
||||
#endif
|
||||
|
||||
#define EE_HANDS
|
||||
|
||||
#define TAPPING_TERM 175
|
||||
#define COMBO_TERM 300
|
||||
#define RETRO_TAPPING
|
1901
img/crkbd-default-layer.svg
Normal file
1901
img/crkbd-default-layer.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 38 KiB |
BIN
img/crkbd-phosphorous.jpg
Normal file
BIN
img/crkbd-phosphorous.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 315 KiB |
124
keymap.c
Normal file
124
keymap.c
Normal file
|
@ -0,0 +1,124 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include "version.h"
|
||||
|
||||
// START-MUGUR-REGION
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "version.h"
|
||||
|
||||
/* Macros */
|
||||
enum custom_keycodes {EPRM = SAFE_RANGE, MACRO_15, MACRO_14, MACRO_13, MACRO_12, MACRO_11, MACRO_10, MACRO_9, MACRO_8, MACRO_7, MACRO_6, MACRO_5, MACRO_4, MACRO_3, MACRO_2, MACRO_1};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case MACRO_1: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_0)); return false;
|
||||
case MACRO_2: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_2)); return false;
|
||||
case MACRO_3: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_3)); return false;
|
||||
case MACRO_4: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_4) SS_TAP(X_T)); return false;
|
||||
case MACRO_5: SEND_STRING(SS_LALT(SS_TAP(X_X)) "gtd" SS_TAP(X_ENTER)); return false;
|
||||
case MACRO_6: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_B)); return false;
|
||||
case MACRO_7: SEND_STRING("λ"); return false;
|
||||
case MACRO_8: SEND_STRING(SS_LALT(SS_TAP(X_X)) "magit" SS_TAP(X_ENTER)); return false;
|
||||
case MACRO_9: SEND_STRING(SS_RGUI(SS_TAP(X_I)) SS_TAP(X_E)); return false;
|
||||
case MACRO_10: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_8)); return false;
|
||||
case MACRO_11: SEND_STRING(SS_RGUI(SS_TAP(X_I)) SS_TAP(X_O)); return false;
|
||||
case MACRO_12: SEND_STRING(SS_RGUI(SS_TAP(X_I)) SS_TAP(X_L)); return false;
|
||||
case MACRO_13: SEND_STRING(SS_RGUI(SS_TAP(X_M)) SS_TAP(X_S)); return false;
|
||||
case MACRO_14: SEND_STRING(SS_RGUI(SS_TAP(X_D))); return false;
|
||||
case MACRO_15: SEND_STRING(SS_RGUI(SS_TAP(X_M)) SS_TAP(X_ENTER)); return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/* Tap Dances */
|
||||
|
||||
|
||||
/* Leader Keys */
|
||||
|
||||
|
||||
/* Combos */
|
||||
|
||||
|
||||
/* Layer Codes and Matrix */
|
||||
enum layer_codes {BASE, NUMERIC, MOVE, EMACS, HYPM, QMIK};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = LAYOUT_split_3x6_3(KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, LT(MOVE, KC_QUOTE), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUESTION, MO(QMIK), MO(EMACS), KC_LAPO, MT(MOD_LGUI, KC_SPACE), KC_ENTER, KC_RAPC, TG(NUMERIC)),
|
||||
|
||||
[NUMERIC] = LAYOUT_split_3x6_3(KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LT(MOVE, KC_ENTER), KC_LSFT, KC_TRNS, KC_LEFT_ANGLE_BRACKET, KC_LEFT_CURLY_BRACE, KC_LBRACKET, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_RBRACKET, KC_RIGHT_CURLY_BRACE, KC_RIGHT_ANGLE_BRACKET, KC_PIPE, MO(EMACS), TG(QMIK), LCTL(KC_LALT), KC_TRNS, KC_TRNS, KC_LSFT, TG(NUMERIC)),
|
||||
|
||||
[MOVE] = LAYOUT_split_3x6_3(KC_TRNS, LALT(KC_V), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(KC_LEFT_ANGLE_BRACKET), LCTL(KC_V), LALT(KC_RIGHT_ANGLE_BRACKET), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[EMACS] = LAYOUT_split_3x6_3(KC_ESCAPE, KC_TRNS, KC_TRNS, MACRO_1, MACRO_2, MACRO_3, MACRO_4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(KC_PERCENT), KC_TRNS, KC_TRNS, MACRO_5, MACRO_6, KC_TRNS, KC_TRNS, MACRO_7, KC_TRNS, KC_TRNS, RESET, KC_TRNS, LALT(KC_X), LCTL(KC_C), KC_TRNS, KC_LEFT_PAREN, KC_RIGHT_PAREN, MACRO_8, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACRO_9, MACRO_10, KC_TRNS, MO(HYPM)),
|
||||
|
||||
[HYPM] = LAYOUT_split_3x6_3(KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACRO_15, MACRO_11, MACRO_12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACRO_14, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_M, MACRO_13, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[QMIK] = LAYOUT_split_3x6_3(KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RGB_SAD, RGB_VAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
|
||||
|
||||
// END-MUGUR-REGION
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
// 'fm_logo-128x32', 32x128px
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM fm_logo[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x78, 0x78, 0x78, 0x78, 0x38, 0x30, 0x60, 0xd0, 0xc0, 0x80,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x83, 0xcf, 0xfe, 0xfc, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0c, 0x0e, 0x1e, 0x1e, 0x3e, 0x7e, 0xfe, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x78, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0xfb,
|
||||
0xff, 0xff, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f, 0xff, 0xff,
|
||||
0x7f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1e, 0x1e, 0x1c, 0x1c, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x30, 0x30, 0x60, 0x60, 0x60, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfe, 0xff, 0xf8,
|
||||
0xe0, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0f, 0xff, 0xff, 0xff, 0x1f, 0x0f, 0x07,
|
||||
0x07, 0x07, 0x03, 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0e, 0x1c, 0xf8,
|
||||
0xfc, 0xfe, 0x6f, 0xe7, 0xf3, 0xf9, 0xf9, 0xf9, 0xf9, 0xf3, 0xe3, 0x07, 0x1e, 0xfc, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x07, 0x0f, 0x1c, 0x38, 0x33, 0x33, 0x77, 0x77, 0x33, 0x33, 0x39, 0x1c, 0x0f, 0x07, 0x01, 0x00
|
||||
};
|
||||
oled_write_raw_P(fm_logo, sizeof(fm_logo));
|
||||
}
|
||||
|
||||
// rotate the OLEDs
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (isLeftHand) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return OLED_ROTATION_90;
|
||||
}
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
render_logo();
|
||||
oled_scroll_set_speed(5);
|
||||
oled_scroll_left();
|
||||
}
|
||||
#endif
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
debug_enable=true;
|
||||
//debug_matrix=true;
|
||||
debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
18
rules.mk
Normal file
18
rules.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
# START-MUGUR-REGION
|
||||
|
||||
FORCE_NKRO = yes
|
||||
LEADER_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = no
|
||||
COMBO_ENABLE = no
|
||||
|
||||
# END-MUGUR-REGION BOOTLOADER = atmel-dfu # Elite-C
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = yes # WS2812 # per-key RGB and underglow
|
||||
|
||||
UNICODE_ENABLE = yes
|
||||
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no # use mouse keys or not
|
||||
CONSOLE_ENABLE = no # debug info
|
Loading…
Reference in a new issue