From 04b80152ddf31c751a9e357903f44e96dc13df9d Mon Sep 17 00:00:00 2001 From: Kyle Mitchell <45919695+jcmkk3@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:06:37 -0800 Subject: [PATCH] Nav updates (#70) - Add custom behavior so that home/end ignore ctrl so that I don't accidentally go to the first/last line of the file - Swap page up/down to first/last line --- config/base.keymap | 18 ++++++++++++++++-- images/keymap.svg | 42 +++++++++++++++++++++++------------------- keymap-drawer.yaml | 12 ++++++------ 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/config/base.keymap b/config/base.keymap index d1d14f6..77d6437 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -19,6 +19,8 @@ #define PASTE LC(V) #define UNDO LC(Z) #define SLALL LC(A) +#define FHOME LC(HOME) +#define FEND LC(END) /* Key Position Groups */ #define KEYS_L 0 1 2 3 4 10 11 12 13 14 20 21 22 // left-hand keys @@ -61,6 +63,18 @@ hold-trigger-on-release; global-quick-tap; }; + home: home_ignoring_ctrl { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp HOME>, <&kp HOME>; + mods = <(MOD_LCTL|MOD_RCTL)>; + }; + end: end_ignoring_ctrl { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp END>, <&kp END>; + mods = <(MOD_LCTL|MOD_RCTL)>; + }; }; conditional_layers { @@ -113,8 +127,8 @@ nav_layer { label = "Nav"; bindings = < - &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp PG_UP &kp ESC &kp UARW &kp TAB &kp HOME - &kp LGUI &kp LALT &kp LSHFT &kp LCTRL &kp UNDO &kp PG_DN &kp LARW &kp ENTER &kp RARW &kp END + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp FHOME &kp ESC &kp UARW &kp TAB &home + &kp LGUI &kp LALT &kp LSHFT &kp LCTRL &kp UNDO &kp FEND &kp LARW &kp ENTER &kp RARW &end &kp CUT &kp COPY &kp PASTE &kp BSPC &kp DARW &kp DEL &trans &trans &trans &trans >; diff --git a/images/keymap.svg b/images/keymap.svg index d9fe02e..396c2b8 100644 --- a/images/keymap.svg +++ b/images/keymap.svg @@ -82,6 +82,10 @@ text.shifted { dominant-baseline: hanging; } +text.layer-activator { + text-decoration: underline; +} + /* styling for hold/shifted label text in combo box */ text.combo.hold, text.combo.shifted { font-size: 8px; @@ -124,7 +128,7 @@ path.combo { stroke: #7f7f7f; } } -base: +base: @@ -232,8 +236,9 @@ path.combo { stroke: #7f7f7f; } -nav - + +nav + space @@ -244,8 +249,9 @@ path.combo { stroke: #7f7f7f; } -sym - + +sym + v @@ -261,7 +267,7 @@ path.combo { stroke: #7f7f7f; } -nav: +nav: @@ -285,7 +291,7 @@ path.combo { stroke: #7f7f7f; } -pg🠕 +first @@ -313,7 +319,7 @@ path.combo { stroke: #7f7f7f; } -shift +shft @@ -325,7 +331,7 @@ path.combo { stroke: #7f7f7f; } -pg🠗 +last @@ -333,7 +339,7 @@ path.combo { stroke: #7f7f7f; } -enter +entr @@ -357,9 +363,7 @@ path.combo { stroke: #7f7f7f; } - -backspace - +bksp @@ -390,7 +394,7 @@ path.combo { stroke: #7f7f7f; } -sym: +sym: @@ -462,7 +466,7 @@ path.combo { stroke: #7f7f7f; } -shift +shft @@ -511,7 +515,7 @@ path.combo { stroke: #7f7f7f; } -num: +num: @@ -556,7 +560,7 @@ path.combo { stroke: #7f7f7f; } 3 -shift +shft @@ -579,7 +583,7 @@ path.combo { stroke: #7f7f7f; } 8 -shift +shft @@ -623,7 +627,7 @@ path.combo { stroke: #7f7f7f; } -Combos: +Combos: diff --git a/keymap-drawer.yaml b/keymap-drawer.yaml index 867918b..453dc80 100644 --- a/keymap-drawer.yaml +++ b/keymap-drawer.yaml @@ -18,19 +18,19 @@ layers: - shift - sym nav: - - [f1, f2, f3, f4, f5, pg🠕, esc, 🠕, tab, home] - - [gui, alt, shift, ctrl, undo, pg🠗, 🠔, enter, ➝, end] - - [cut, copy, paste, back space, 🠗, del] + - [f1, f2, f3, f4, f5, first, esc, 🠕, tab, home] + - [gui, alt, shft, ctrl, undo, last, 🠔, entr, ➝, end] + - [cut, copy, paste, bksp, 🠗, del] - [{t: '', type: held}, '', '', ''] sym: - ['!', '@', '#', $, '%', ^, '&', ';', ':', '?'] - - ['~', '=', '-', '/', '`', '\', ctrl, shift, alt, gui] + - ['~', '=', '-', '/', '`', '\', ctrl, shft, alt, gui] - ['_', '+', '*', '|', <, '>'] - ['', '', '', {t: '', type: held}] num: - ['', '', '', '', '', '', '', '', '', ''] - - [{t: '1', h: gui}, {t: '2', h: alt}, {t: '3', h: shift}, {t: '4', h: ctrl}, '5', - '6', {t: '7', h: ctrl}, {t: '8', h: shift}, {t: '9', h: alt}, {t: '0', h: gui}] + - [{t: '1', h: gui}, {t: '2', h: alt}, {t: '3', h: shft}, {t: '4', h: ctrl}, '5', + '6', {t: '7', h: ctrl}, {t: '8', h: shft}, {t: '9', h: alt}, {t: '0', h: gui}] - ['', '', '', '', '', ''] - [{t: '', type: held}, '', '', {t: '', type: held}] combos: