Skip to content

Commit

Permalink
Nav updates (#70)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
jcmkk3 authored Dec 11, 2024
1 parent b299e68 commit 04b8015
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 27 deletions.
18 changes: 16 additions & 2 deletions config/base.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
>;
Expand Down
42 changes: 23 additions & 19 deletions images/keymap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions keymap-drawer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 04b8015

Please sign in to comment.