Skip to content

Commit b42866d

Browse files
authored
Enable Mouse Functionality and layer (#17)
* Enables mouse functionality Update zmk revision to main Adds the mouse layer As ZMK now supports mouse input, I've added the mouse layer and inputs to both the left and right matching the inputs on ardux.io * Set fixed current ZMK version Pinned the version in west.yaml so upstream updates dont break github actions.
1 parent b6fd1f7 commit b42866d

20 files changed

+82
-5
lines changed

config/ardux.dtsi

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <behaviors.dtsi>
88
#include <dt-bindings/zmk/keys.h>
99
#include <dt-bindings/zmk/outputs.h>
10+
#include <dt-bindings/zmk/pointing.h>
1011

1112
/*****************************************
1213
* Macros for filling in "&none" in the right places in the keymap for re-use needs
@@ -209,9 +210,10 @@
209210
#define LAYER_ID_PARENTHETICALS 3
210211
#define LAYER_ID_NAVIGATION 4
211212
#define LAYER_ID_BT_SEL 5
212-
#define LAYER_ID_CUSTOM 6
213-
#define LAYER_ID_BIG_SYM 7
214-
#define LAYER_ID_BIG_FUNCTION 8
213+
#define LAYER_ID_MOUSE 6
214+
#define LAYER_ID_CUSTOM 7
215+
#define LAYER_ID_BIG_SYM 8
216+
#define LAYER_ID_BIG_FUNCTION 9
215217

216218
/*****************************************
217219
* Standard ARDUX combo definitions
@@ -246,7 +248,7 @@
246248
combo_j { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_T KEY_S>; bindings = <&kp J>; };
247249
combo_w { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_A KEY_S>; bindings = <&kp W>; };
248250
combo_k { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_Y KEY_O>; bindings = <&kp K>; };
249-
combo_period { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_A KEY_Y>; bindings = <&kp PERIOD>; };
251+
combo_period { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_A KEY_Y>; bindings = <&kp PERIOD>; };
250252
combo_comma { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_A KEY_I>; bindings = <&kp COMMA>; };
251253
combo_slash { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_A KEY_O>; bindings = <&kp SLASH>; };
252254
combo_exclamation { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_2>; key-positions = <KEY_T KEY_I>; bindings = <&kp EXCL>; };
@@ -261,6 +263,7 @@
261263
*****************************************/
262264
combo_esc { timeout-ms = <TIMEOUT_COMBO_3>; key-positions = <KEY_A KEY_R KEY_O>; bindings = <&kp ESC>; };
263265
combo_layer_navigation { timeout-ms = <TIMEOUT_COMBO_3>; key-positions = <KEY_R KEY_E KEY_I>; bindings = <&tog LAYER_ID_NAVIGATION>; };
266+
combo_layer_mouse { timeout-ms = <TIMEOUT_COMBO_3>; key-positions = <KEY_A KEY_T KEY_Y>; bindings = <&tog LAYER_ID_MOUSE>; };
264267

265268
combo_m { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_3>; key-positions = <KEY_Y KEY_I KEY_O>; bindings = <&kp M>; };
266269
combo_d { layers = <LAYER_ID_BASE>; timeout-ms = <TIMEOUT_COMBO_3>; key-positions = <KEY_A KEY_R KEY_T>; bindings = <&kp D>; };
@@ -399,6 +402,16 @@
399402
TRAILING_NONES
400403
>;
401404
};
405+
mouse {
406+
display-name = "Mouse";
407+
bindings = <
408+
LEADING_NONES
409+
&mkp LCLK &mmv MOVE_UP &mkp RCLK &msc SCRL_UP
410+
MIDDLE_NONES
411+
&mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &msc SCRL_DOWN
412+
TRAILING_NONES
413+
>;
414+
};
402415
ARDUX_LAYER_CUSTOM
403416
#if defined ARDUX_BIG
404417
big_ardux_symbol {
@@ -522,6 +535,16 @@
522535
TRAILING_NONES
523536
>;
524537
};
538+
mouse {
539+
display-name = "Mouse";
540+
bindings = <
541+
LEADING_NONES
542+
&msc SCRL_UP &mkp RCLK &mmv MOVE_UP &mkp LCLK
543+
MIDDLE_NONES
544+
&msc SCRL_DOWN &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT
545+
TRAILING_NONES
546+
>;
547+
};
525548
ARDUX_LAYER_CUSTOM
526549
#if defined ARDUX_BIG
527550
big_ardux_symbol {

config/boards/shields/artboard/artboard_left.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/artboard/artboard_right.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/bluehand/bluehand_left.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=n
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/bluehand/bluehand_right.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=n
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/corne_left/corne_5_col_ardux_left.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/corne_left/corne_5_col_ardux_left_big.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/corne_left/corne_ardux_left.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/corne_right/corne_5_col_ardux_right.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

config/boards/shields/corne_right/corne_5_col_ardux_right_big.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_ZMK_DISPLAY=y
1515

1616
# Turn off sleep
1717
CONFIG_ZMK_SLEEP=n
18+
19+
# Enables mouse functionality
20+
CONFIG_ZMK_POINTING=y

0 commit comments

Comments
 (0)