-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf84cbd
commit d5f0a7b
Showing
7 changed files
with
331 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
#include <dt-bindings/zmk/outputs.h> | ||
|
||
#define TD_TAPPING_TERM 300 | ||
|
||
/ { | ||
|
||
behaviors { | ||
|
||
/* | ||
* Auto Mod | ||
* | ||
* Usage: &am RPAR LPAR | ||
* Tap: ( | ||
* Hold: ) | ||
* | ||
* -- | ||
* | ||
* Auto Shift | ||
* | ||
* Usage: AS(A) | ||
* Tap: a | ||
* Hold: A (shifted 'a') | ||
*/ | ||
|
||
am: auto_mod { | ||
compatible = "zmk,behavior-hold-tap"; | ||
label = "AUTO_MOD"; | ||
#binding-cells = <2>; | ||
tapping_term_ms = <300>; | ||
quick_tap_ms = <0>; | ||
flavor = "tap-preferred"; | ||
bindings = <&kp>, <&kp>; | ||
}; | ||
#define AM(hold_keycode, tap_keycode) &am hold_keycode tap_keycode | ||
#define AS(keycode) &am LS(keycode) keycode | ||
|
||
|
||
/* | ||
* Tap dancing shift | ||
* | ||
* Usage: &td_shift_l / &td_shift_r | ||
* Hold: Shift | ||
* Double Tap: Caps Word | ||
* Triple Tap: Caps Lock | ||
*/ | ||
|
||
td_shift_l: td_shift_l { | ||
compatible = "zmk,behavior-tap-dance"; | ||
label = "TAP_DANCE_SHIFT_LEFT"; | ||
#binding-cells = <0>; | ||
tapping-term-ms = <TD_TAPPING_TERM>; | ||
bindings = <&kp LEFT_SHIFT>, <&caps_word>, <&kp CAPSLOCK>; | ||
}; | ||
|
||
td_shift_r: td_shift_r { | ||
compatible = "zmk,behavior-tap-dance"; | ||
label = "TAP_DANCE_SHIFT_RIGHT"; | ||
#binding-cells = <0>; | ||
tapping-term-ms = <TD_TAPPING_TERM>; | ||
bindings = <&kp RIGHT_SHIFT>, <&caps_word>, <&kp CAPSLOCK>; | ||
}; | ||
|
||
|
||
/* | ||
* Double Tap to clear BT | ||
* | ||
* Usage: &td_out_bt_clear | ||
* Hold / Tap: Toggle output (USB or BT) | ||
* Double Tap: Clear BT | ||
*/ | ||
td_out_bt_clear: td_out_bt_clear { | ||
compatible = "zmk,behavior-tap-dance"; | ||
label = "td_out_bt_clear"; | ||
#binding-cells = <0>; | ||
tapping-term-ms = <TD_TAPPING_TERM>; | ||
bindings = <&out OUT_TOG>, <&bt BT_CLR>; | ||
}; | ||
|
||
|
||
/* | ||
* Tap dancing num layer | ||
* | ||
* Usage: &td_num_layer | ||
* Tap: DEL | ||
* Hold: NUM layer | ||
* Double Tap: NUM_WORD layer | ||
* Triple Tap: NUM layer toggled | ||
*/ | ||
td_num_layer: td_num_layer { | ||
compatible = "zmk,behavior-tap-dance"; | ||
label = "TAP_DANCE_NUM_LAYER"; | ||
#binding-cells = <0>; | ||
tapping-term-ms = <250>; | ||
bindings = << NUM DEL>, <&num_word>; | ||
}; | ||
|
||
/* | ||
* Tap dancing nav layer | ||
* | ||
* Usage: &td_nav_layer NAV 0 | ||
* Tap: RET | ||
* Double Tap: NAV_WORD layer | ||
* Triple-Tap-Hold: RET repeated | ||
* Hold: NAV layer | ||
*/ | ||
td_nav_layer_inner: td_nav_layer_inner { | ||
compatible = "zmk,behavior-tap-dance"; | ||
label = "td_nav_layer_inner"; | ||
#binding-cells = <0>; | ||
tapping-term-ms = <250>; | ||
bindings = <&kp RET>, <&nav_word>, <&kp RET>; | ||
}; | ||
td_nav_layer: td_nav_layer { | ||
compatible = "zmk,behavior-hold-tap"; | ||
label = "td_nav_layer"; | ||
#binding-cells = <2>; | ||
flavor = "tap-preferred"; | ||
tapping-term-ms = <250>; | ||
quick-tap-ms = <225>; | ||
bindings = <&mo>, <&td_nav_layer_inner>; | ||
}; | ||
|
||
/* | ||
* Tap dancing sym layer | ||
* | ||
* Usage: &td_sym_layer | ||
* Tap: DEL | ||
* Hold: NAV layer | ||
* Double Tap: NAV_WORD layer | ||
* Triple Tap: NAV layer toggled | ||
*/ | ||
td_sym_layer: td_sym_layer { | ||
compatible = "zmk,behavior-tap-dance"; | ||
label = "td_sym_layer"; | ||
#binding-cells = <0>; | ||
tapping-term-ms = <250>; | ||
bindings = <&mm_spc_unds_layer>, <&sym_word>; | ||
}; | ||
|
||
nav_word: nav_word { | ||
compatible = "zmk,behavior-caps-word"; | ||
label = "NAV_WORD"; | ||
#binding-cells = <0>; | ||
layers = <NAV_WORD>; | ||
continue-list = < | ||
LEFT DOWN UP RIGHT | ||
PG_UP PG_DN | ||
MY_UNDO MY_CUT MY_COPY MY_PASTE | ||
>; | ||
ignore-modifiers; // modifiers don't deactivate the layer | ||
}; | ||
|
||
sym_word: sym_word { | ||
compatible = "zmk,behavior-caps-word"; | ||
label = "sym_word"; | ||
#binding-cells = <0>; | ||
layers = <SYM_WORD>; | ||
continue-list = < | ||
CARET AMPERSAND PLUS EQUAL MINUS SLASH PIPE | ||
TILDE PERCENT UNDERSCORE EXCLAMATION DOLLAR SEMICOLON | ||
HASH COLON GRAVE ASTERISK BACKSLASH AT_SIGN | ||
RPAR LPAR RBKT LBKT RBRC LBRC GT LT | ||
BACKSPACE | ||
>; | ||
ignore-modifiers; // modifiers don't deactivate the layer | ||
}; | ||
|
||
lt_num_word: lt_num_word { | ||
compatible = "zmk,behavior-hold-tap"; | ||
label = "lt_num_word"; | ||
#binding-cells = <2>; | ||
flavor = "balanced"; | ||
tapping-term-ms = <200>; | ||
bindings = <&mo>, <&num_word>; | ||
}; | ||
|
||
/* | ||
* Swapper CMD + TAB | ||
* | ||
* Use CMD TAB app switcher with a single app press. | ||
* Requires ZMK PR #1366. | ||
*/ | ||
swapper_cmd_tab: swapper { | ||
compatible = "zmk,behavior-tri-state"; | ||
label = "SWAPPER"; | ||
#binding-cells = <0>; | ||
bindings = <&kt LGUI>, <&kp TAB>, <&kt LGUI>; | ||
// ignored-key-positions = <x>; | ||
}; | ||
|
||
/* | ||
* Layer Toggle | ||
* | ||
* Usage: <og LGUI NAV | ||
* Tap: Layer Toggle | ||
* Hold: Keypress | ||
*/ | ||
ltog: ltog { | ||
compatible = "zmk,behavior-hold-tap"; | ||
label = "ltog"; | ||
#binding-cells = <2>; | ||
flavor = "tap-preferred"; | ||
tapping-term-ms = <250>; | ||
bindings = <&kp>, <&tog>; | ||
}; | ||
|
||
/* | ||
* Layer Sticky Key Tap Toggle | ||
* | ||
* Usage: &sklt NUM RSHFT | ||
* Tap: Sticky Key | ||
* Hold: Layer | ||
*/ | ||
sklt: sklt { | ||
compatible = "zmk,behavior-hold-tap"; | ||
label = "sklt"; | ||
#binding-cells = <2>; | ||
flavor = "balanced"; | ||
tapping-term-ms = <250>; | ||
bindings = <&mo>, <&sk>; | ||
}; | ||
}; | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Navigation | ||
#define MY_LEFT_W LA(LEFT) | ||
#define MY_LEFT_L LG(LEFT) | ||
#define MY_RIGHT_W LA(RIGHT) | ||
#define MY_RIGHT_L LG(RIGHT) | ||
|
||
// HYPER and MEH | ||
#define MY_HYPER LS(LC(LG(LALT))) | ||
#define MY_MEH LC(LG(LALT)) | ||
|
||
// Shortcuts | ||
#define MY_UNDO LG(Z) | ||
#define MY_REDO LS(LG(Z)) | ||
#define MY_CUT LG(X) | ||
#define MY_COPY LG(C) | ||
#define MY_PASTE LG(V) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Make sure this file is included before all other files | ||
|
||
/* | ||
* Layer Tap Settings | ||
*/ | ||
< { | ||
// Increase layer tap time | ||
tapping-term-ms = <300>; | ||
|
||
// Quickly tap-tap-holding the lt button will repeat the tap behavior | ||
// For example enter-enter-hold, will output multiple enter while you | ||
// keep holding the key. | ||
// But holding enter without double tapping, will activate the layer. | ||
quick_tap_ms = <200>; | ||
|
||
flavor = "balanced"; | ||
}; | ||
|
||
/* | ||
* Caps Word Settings | ||
*/ | ||
&caps_word { | ||
// Allow caps word to continue even when minus or underscore | ||
// are pressed. | ||
// Also prevent mod presses from cancelling caps word. | ||
continue-list = < | ||
UNDERSCORE MINUS | ||
LCTRL LALT LGUI LSHFT | ||
RCTRL RALT RGUI RSHFT | ||
BACKSPACE | ||
>; | ||
/delete-property/ ignore-modifiers; | ||
}; | ||
|
||
&caps_word_capslock { | ||
disable-on-keys = < | ||
SPACE TAB ENTER ESCAPE | ||
COMMA DOT SEMI COLON QUESTION EXCLAMATION | ||
SLASH BACKSLASH SINGLE_QUOTE DOUBLE_QUOTES GRAVE | ||
LPAR RPAR LBKT RBKT LBRC RBRC LT GT | ||
>; | ||
}; | ||
|
||
&num_word { | ||
layers = <NUM_WORD>; | ||
continue-list = < | ||
BACKSPACE DELETE DOT COMMA | ||
SLASH ASTERISK PLUS MINUS EQUAL DOLLAR | ||
RS(SPACE) | ||
>; | ||
ignore-modifiers; // modifiers don't deactivate the layer | ||
|
||
}; |
Oops, something went wrong.