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.
36 lines
628 B
Text
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)
|
|
>;
|
|
};
|