zmk/app/tests/caps-word/modify-optional-non-alphas/native_posix_64.keymap
Ryan Schenk 79aad1af77 feat(behaviors): caps-word supports alternative layouts
The problem when using alternative layouts (Colemak, Dvorak, etc) mapped
in the OS, or when using a foreign keyboard, there will be alpha
characters that the keyboard "thinks" are symbols, and therefore
caps-word will not shift them. This adds the ability to configure
caps-word to shift these keycodes so that it works as expected.
2022-10-04 20:50:05 -04:00

36 lines
628 B
Text

#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>
#include <dt-bindings/zmk/kscan_mock.h>
#include "../behavior_keymap.dtsi"
&caps_word {
continue-list = <UNDERSCORE BACKSPACE DELETE SEMI>;
also-mod-list = <SEMI>;
};
/ {
keymap {
compatible = "zmk,keymap";
label = "Default keymap";
default_layer {
bindings = <
&caps_word &kp A
&kp SEMI &kp MINUS
>;
};
};
};
&kscan {
events = <
ZMK_MOCK_PRESS(0,0,10)
ZMK_MOCK_RELEASE(0,0,10)
ZMK_MOCK_PRESS(0,1,10)
ZMK_MOCK_RELEASE(0,1,10)
ZMK_MOCK_PRESS(1,0,10)
ZMK_MOCK_RELEASE(1,0,10)
ZMK_MOCK_PRESS(0,1,10)
ZMK_MOCK_RELEASE(0,1,10)
>;
};