Merge branch 'main' into advantage360
This commit is contained in:
commit
a947cfe07c
41 changed files with 293 additions and 76 deletions
|
@ -73,19 +73,3 @@ CONFIG_ZMK_WIDGET_LAYER_STATUS=n
|
|||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_USE_DEBUG=y
|
||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
|
||||
# Turn on USB CDC ACM device
|
||||
CONFIG_USB_DEVICE_STACK=y
|
||||
CONFIG_USB_CDC_ACM=y
|
||||
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024
|
||||
|
||||
# Enable serial console
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_UART_LINE_CTRL=y
|
||||
|
||||
# Enable USB UART
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
|
||||
|
|
|
@ -72,12 +72,3 @@ CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n
|
|||
#CONFIG_LVGL_LOG_LEVEL_DBG=y
|
||||
#CONFIG_LVGL_USE_DEBUG=y
|
||||
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
|
||||
# Enable serial console
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_UART_LINE_CTRL=y
|
||||
|
||||
# Enable USB UART
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
|
|
@ -116,6 +116,10 @@
|
|||
|
||||
&usb {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
&clk_hsi {
|
||||
|
@ -139,10 +143,6 @@
|
|||
|
||||
&rtc {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||
|
|
|
@ -48,9 +48,9 @@
|
|||
bindings = <
|
||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS
|
||||
&kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH
|
||||
&kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &kp RSHFT
|
||||
&kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &none &kp RSHFT
|
||||
&kp LCTRL &kp LGUI &kp LALT &reset &none &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
* .----------------------------------------------------------------------------------------------------------------------.
|
||||
*/ /* FIXME boot and reset are not yet locale aware */
|
||||
bindings = <
|
||||
&kp F11 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp &none &kp &none &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F12
|
||||
&kp F11 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &none &none &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F12
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&trans &bootloader &reset &none &none &none &none &none &none &none &none &none &none &trans
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&crkbd_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 16 GPIO_ACTIVE_HIGH>
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&jian_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&crkbd_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 7 GPIO_ACTIVE_HIGH>
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&crkbd_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <6>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||
|
|
|
@ -36,10 +36,10 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
|||
columns = <14>;
|
||||
rows = <4>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
|
||||
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
|
||||
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
|
||||
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,14)
|
||||
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -36,10 +36,10 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
|||
columns = <14>;
|
||||
rows = <4>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
|
||||
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
|
||||
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
|
||||
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,14)
|
||||
RC(3,2) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
@ -52,4 +52,4 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
|||
&right_encoder {
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
col-offset = <8>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <8>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
row-gpios
|
||||
= <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
col-offset = <8>;
|
||||
};
|
||||
|
||||
&five_column_transform {
|
||||
col-offset = <8>;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 10 GPIO_ACTIVE_HIGH>
|
||||
|
|
|
@ -23,26 +23,26 @@
|
|||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
|
||||
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHFT RET
|
||||
&kp LALT &mo 1 &kp SPACE &mo 2 &kp RALT
|
||||
&kp LALT &mo 1 &kp SPACE &mo 2 &kp RGUI
|
||||
>;
|
||||
};
|
||||
|
||||
lower_layer {
|
||||
// ----------------------------------------------------------------------------------
|
||||
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL |
|
||||
// | | _ | + | { | } | "|" | | LFT | DWN | UP | RGT | ` | ~ |
|
||||
// | | ESC | GUI | ALT | CAPS| " | | HOME| END | PGUP| PGDN| PRSC| SHFT(RET) |
|
||||
// ------------------------------------------------------------------------------------
|
||||
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL |
|
||||
// | | _ | + | { | } | "|" | | LFT | DWN | UP | RGT | ` | ~ |
|
||||
// | | ESC | GUI | ALT | CAPS| " | | HOME| END | PGUP| PGDN| PRSC| SHFT(SPACE) |
|
||||
// | | | RET | ADJ | |
|
||||
bindings = <
|
||||
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp N8 &kp LPAR &kp RPAR &kp DEL
|
||||
&trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp GRAVE &kp TILDE
|
||||
&trans &kp ESC &kp LGUI &kp LALT &kp CLCK &kp DQT &kp HOME &kp END &kp PG_UP &kp PG_DN &kp PSCRN &mt RSHFT RET
|
||||
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp DEL
|
||||
&trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp GRAVE &kp TILDE
|
||||
&trans &kp ESC &kp LGUI &kp LALT &kp CLCK &kp DQT &kp HOME &kp END &kp PG_UP &kp PG_DN &kp PSCRN &mt RSHFT SPACE
|
||||
&trans &trans &kp RET &mo 3 &trans
|
||||
>;
|
||||
};
|
||||
|
||||
raise_layer {
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
// | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL |
|
||||
// | | - | = | [ | ] | \ | | F1 | F2 | F3 | F4 | F5 | F6 |
|
||||
// | | ESC | GUI | ALT | CAPS| " | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
bindings = <
|
||||
&kp KP_NUMLOCK &kp KP_ASTERISK &kp KP_MINUS
|
||||
&kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS
|
||||
&kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp &none
|
||||
&kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &none
|
||||
&kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 < 1 KP_ENTER
|
||||
&none &kp KP_NUMBER_0 &kp KP_DOT &none
|
||||
>;
|
||||
|
|
|
@ -37,3 +37,5 @@ properties:
|
|||
type: array
|
||||
required: false
|
||||
default: []
|
||||
hold-trigger-on-release:
|
||||
type: boolean
|
||||
|
|
|
@ -33,7 +33,7 @@ if [ $? -gt 0 ]; then
|
|||
fi
|
||||
|
||||
./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log
|
||||
diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log
|
||||
diff -auZ $testcase/keycode_events.snapshot build/$testcase/keycode_events.log
|
||||
if [ $? -gt 0 ]; then
|
||||
if [ -f $testcase/pending ]; then
|
||||
echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log
|
||||
|
|
|
@ -60,6 +60,7 @@ struct behavior_hold_tap_config {
|
|||
bool global_quick_tap;
|
||||
enum flavor flavor;
|
||||
bool retro_tap;
|
||||
bool hold_trigger_on_release;
|
||||
int32_t hold_trigger_key_positions_len;
|
||||
int32_t hold_trigger_key_positions[];
|
||||
};
|
||||
|
@ -587,9 +588,11 @@ static int position_state_changed_listener(const zmk_event_t *eh) {
|
|||
}
|
||||
|
||||
// Store the position of pressed key for positional hold-tap purposes.
|
||||
if ((ev->state) // i.e. key pressed (not released)
|
||||
if ((undecided_hold_tap->config->hold_trigger_on_release !=
|
||||
ev->state) // key has been pressed and hold_trigger_on_release is not set, or key
|
||||
// has been released and hold_trigger_on_release is set
|
||||
&& (undecided_hold_tap->position_of_first_other_key_pressed ==
|
||||
-1) // i.e. no other key has been pressed yet
|
||||
-1) // no other key has been pressed yet
|
||||
) {
|
||||
undecided_hold_tap->position_of_first_other_key_pressed = ev->position;
|
||||
}
|
||||
|
@ -703,6 +706,7 @@ static int behavior_hold_tap_init(const struct device *dev) {
|
|||
.global_quick_tap = DT_INST_PROP(n, global_quick_tap), \
|
||||
.flavor = DT_ENUM_IDX(DT_DRV_INST(n), flavor), \
|
||||
.retro_tap = DT_INST_PROP(n, retro_tap), \
|
||||
.hold_trigger_on_release = DT_INST_PROP(n, hold_trigger_on_release), \
|
||||
.hold_trigger_key_positions = DT_INST_PROP(n, hold_trigger_key_positions), \
|
||||
.hold_trigger_key_positions_len = DT_INST_PROP_LEN(n, hold_trigger_key_positions), \
|
||||
}; \
|
||||
|
|
|
@ -75,15 +75,15 @@ static struct zmk_led_hsb hsb_scale_zero_max(struct zmk_led_hsb hsb) {
|
|||
}
|
||||
|
||||
static struct led_rgb hsb_to_rgb(struct zmk_led_hsb hsb) {
|
||||
double r, g, b;
|
||||
float r, g, b;
|
||||
|
||||
uint8_t i = hsb.h / 60;
|
||||
double v = hsb.b / ((float)BRT_MAX);
|
||||
double s = hsb.s / ((float)SAT_MAX);
|
||||
double f = hsb.h / ((float)HUE_MAX) * 6 - i;
|
||||
double p = v * (1 - s);
|
||||
double q = v * (1 - f * s);
|
||||
double t = v * (1 - (1 - f) * s);
|
||||
float v = hsb.b / ((float)BRT_MAX);
|
||||
float s = hsb.s / ((float)SAT_MAX);
|
||||
float f = hsb.h / ((float)HUE_MAX) * 6 - i;
|
||||
float p = v * (1 - s);
|
||||
float q = v * (1 - f * s);
|
||||
float t = v * (1 - (1 - f) * s);
|
||||
|
||||
switch (i % 6) {
|
||||
case 0:
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*mo_keymap_binding/mo/p
|
||||
s/.*on_hold_tap_binding/ht_binding/p
|
||||
s/.*decide_hold_tap/ht_decide/p
|
|
@ -0,0 +1,12 @@
|
|||
ht_binding_pressed: 0 new undecided hold_tap
|
||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_decide: 0 decided hold-interrupt (balanced decision moment other-key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_pressed: 1 new undecided hold_tap
|
||||
ht_decide: 1 decided tap (balanced decision moment key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 1 cleaning up hold-tap
|
||||
kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 0 cleaning up hold-tap
|
|
@ -0,0 +1,17 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&ht_bal { hold-trigger-on-release; };
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // mod 1
|
||||
ZMK_MOCK_PRESS(0,1,10) // mod 2
|
||||
ZMK_MOCK_PRESS(1,1,10) // not trigger position
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*mo_keymap_binding/mo/p
|
||||
s/.*on_hold_tap_binding/ht_binding/p
|
||||
s/.*decide_hold_tap/ht_decide/p
|
|
@ -0,0 +1,12 @@
|
|||
ht_binding_pressed: 0 new undecided hold_tap
|
||||
ht_decide: 0 decided hold-interrupt (balanced decision moment other-key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_pressed: 1 new undecided hold_tap
|
||||
ht_decide: 1 decided hold-interrupt (balanced decision moment other-key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 1 cleaning up hold-tap
|
||||
kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 0 cleaning up hold-tap
|
|
@ -0,0 +1,17 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&ht_bal { hold-trigger-on-release; };
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // mod 1
|
||||
ZMK_MOCK_PRESS(0,1,10) // mod 2
|
||||
ZMK_MOCK_PRESS(1,0,10) // trigger position
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*mo_keymap_binding/mo/p
|
||||
s/.*on_hold_tap_binding/ht_binding/p
|
||||
s/.*decide_hold_tap/ht_decide/p
|
|
@ -0,0 +1,12 @@
|
|||
ht_binding_pressed: 0 new undecided hold_tap
|
||||
ht_decide: 0 decided hold-interrupt (hold-preferred decision moment other-key-down)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_pressed: 1 new undecided hold_tap
|
||||
ht_decide: 1 decided hold-interrupt (hold-preferred decision moment other-key-down)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 1 cleaning up hold-tap
|
||||
kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 0 cleaning up hold-tap
|
|
@ -0,0 +1,17 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&ht_hold { hold-trigger-on-release; };
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // mod 1
|
||||
ZMK_MOCK_PRESS(0,1,10) // mod 2
|
||||
ZMK_MOCK_PRESS(1,1,10) // not trigger position
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*mo_keymap_binding/mo/p
|
||||
s/.*on_hold_tap_binding/ht_binding/p
|
||||
s/.*decide_hold_tap/ht_decide/p
|
|
@ -0,0 +1,12 @@
|
|||
ht_binding_pressed: 0 new undecided hold_tap
|
||||
ht_decide: 0 decided hold-interrupt (hold-preferred decision moment other-key-down)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_pressed: 1 new undecided hold_tap
|
||||
ht_decide: 1 decided hold-interrupt (hold-preferred decision moment other-key-down)
|
||||
kp_pressed: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0xE0 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 1 cleaning up hold-tap
|
||||
kp_released: usage_page 0x07 keycode 0xE1 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 0 cleaning up hold-tap
|
|
@ -0,0 +1,17 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&ht_hold { hold-trigger-on-release; };
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // mod 1
|
||||
ZMK_MOCK_PRESS(0,1,10) // mod 2
|
||||
ZMK_MOCK_PRESS(1,0,10) // trigger position
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*mo_keymap_binding/mo/p
|
||||
s/.*on_hold_tap_binding/ht_binding/p
|
||||
s/.*decide_hold_tap/ht_decide/p
|
|
@ -0,0 +1,12 @@
|
|||
ht_binding_pressed: 0 new undecided hold_tap
|
||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_decide: 0 decided tap (tap-preferred decision moment key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_pressed: 1 new undecided hold_tap
|
||||
ht_decide: 1 decided tap (tap-preferred decision moment key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x08 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 1 cleaning up hold-tap
|
||||
kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 0 cleaning up hold-tap
|
|
@ -0,0 +1,17 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&tp { hold-trigger-on-release; };
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // mod 1
|
||||
ZMK_MOCK_PRESS(0,1,10) // mod 2
|
||||
ZMK_MOCK_PRESS(1,1,10) // not trigger position
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
s/.*hid_listener_keycode/kp/p
|
||||
s/.*mo_keymap_binding/mo/p
|
||||
s/.*on_hold_tap_binding/ht_binding/p
|
||||
s/.*decide_hold_tap/ht_decide/p
|
|
@ -0,0 +1,12 @@
|
|||
ht_binding_pressed: 0 new undecided hold_tap
|
||||
ht_decide: 0 decided tap (tap-preferred decision moment key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_pressed: 1 new undecided hold_tap
|
||||
ht_decide: 1 decided tap (tap-preferred decision moment key-up)
|
||||
kp_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_pressed: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x07 implicit_mods 0x00 explicit_mods 0x00
|
||||
kp_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 1 cleaning up hold-tap
|
||||
kp_released: usage_page 0x07 keycode 0x09 implicit_mods 0x00 explicit_mods 0x00
|
||||
ht_binding_released: 0 cleaning up hold-tap
|
|
@ -0,0 +1,17 @@
|
|||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
#include "../behavior_keymap.dtsi"
|
||||
|
||||
&tp { hold-trigger-on-release; };
|
||||
|
||||
&kscan {
|
||||
events = <
|
||||
ZMK_MOCK_PRESS(0,0,10) // mod 1
|
||||
ZMK_MOCK_PRESS(0,1,10) // mod 2
|
||||
ZMK_MOCK_PRESS(1,0,10) // trigger position
|
||||
ZMK_MOCK_RELEASE(1,0,10)
|
||||
ZMK_MOCK_RELEASE(0,1,10)
|
||||
ZMK_MOCK_RELEASE(0,0,10)
|
||||
>;
|
||||
};
|
|
@ -10,8 +10,7 @@ manifest:
|
|||
revision: v3.0.0+zmk-fixes
|
||||
clone-depth: 1
|
||||
import:
|
||||
# TODO: Rename once upstream offers option like `exclude` or `denylist`
|
||||
name-blacklist:
|
||||
name-blocklist:
|
||||
- ci-tools
|
||||
- hal_altera
|
||||
- hal_cypress
|
||||
|
|
|
@ -132,6 +132,9 @@ See the following example, which uses a hold-tap behavior definition, configured
|
|||
- The sequence `(pht_down, W_down, W_up, pht_up)` produces `W`. The normal hold behavior (LEFT_SHIFT) **is NOT** modified into a tap behavior (Q) by positional hold-tap because the first key pressed after the hold-tap key is the `W key`, which is in position 1, which **IS** included in `hold-trigger-key-positions`.
|
||||
- If the `LEFT_SHIFT / Q key` is held by itself for longer than `tapping-term-ms`, a hold behavior is produced. This is because positional hold-tap only modifies the behavior of a hold-tap if another key is pressed before the `tapping-term-ms` period expires.
|
||||
|
||||
By default, `hold-trigger-key-positions` are evaluated upon the first _key press_ after
|
||||
the hold-tap. For homerow mods, this is not always ideal, because it prevents combining multiple modifiers unless they are included in `hold-trigger-key-positions`. To overwrite this behavior, one can set `hold-trigger-on-release`. If set to true, the evaluation of `hold-trigger-key-positions` gets delayed until _key release_. This allows combining multiple modifiers when the next key is _held_, while still deciding the hold-tap in favor of a tap when the next key is _tapped_.
|
||||
|
||||
### Example Use-Cases
|
||||
|
||||
<Tabs
|
||||
|
|
|
@ -23,7 +23,7 @@ Variations of the warnings shown below occur when flashing the `<firmware>.uf2`
|
|||
|
||||
### macOS Ventura error
|
||||
|
||||
macOS 13.0 (Ventura) Finder may report an error code 100093 when copying `<firmware>.uf2` files into microcontrollers. This bug is limited to the operating system's Finder. You can work around it by copying on Terminal command line or use a third party file manager.
|
||||
macOS 13.0 (Ventura) Finder may report an error code 100093 when copying `<firmware>.uf2` files into microcontrollers. This bug is limited to the operating system's Finder. You can work around it by copying on Terminal command line or use a third party file manager. Issue is fixed in macOS version 13.1.
|
||||
|
||||
### CMake Error
|
||||
|
||||
|
|
24
docs/package-lock.json
generated
24
docs/package-lock.json
generated
|
@ -3045,9 +3045,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@sideway/formula": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz",
|
||||
"integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg=="
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz",
|
||||
"integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg=="
|
||||
},
|
||||
"node_modules/@sideway/pinpoint": {
|
||||
"version": "2.0.0",
|
||||
|
@ -8281,9 +8281,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/http-cache-semantics": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
|
||||
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
||||
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ=="
|
||||
},
|
||||
"node_modules/http-deceiver": {
|
||||
"version": "1.2.7",
|
||||
|
@ -18139,9 +18139,9 @@
|
|||
}
|
||||
},
|
||||
"@sideway/formula": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz",
|
||||
"integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg=="
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz",
|
||||
"integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg=="
|
||||
},
|
||||
"@sideway/pinpoint": {
|
||||
"version": "2.0.0",
|
||||
|
@ -22047,9 +22047,9 @@
|
|||
}
|
||||
},
|
||||
"http-cache-semantics": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
|
||||
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
||||
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ=="
|
||||
},
|
||||
"http-deceiver": {
|
||||
"version": "1.2.7",
|
||||
|
|
Loading…
Add table
Reference in a new issue