Skip to content

Commit 929ff98

Browse files
author
Kazuki Oishi
committed
Add tap layer and technical fixes from PR beekeeb#7
- Add tap layer that activates only when finger touches trackpad - Fix stack overflow error with CONFIG_INPUT_THREAD_STACK_SIZE=2048 - Change trackpad sensitivity from x2 to x3 - Enable ZMK Studio support - Update cirque-input-module to petejohanson/main for BTN_TOUCH support
1 parent 8efc4a4 commit 929ff98

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

boards/shields/toucan/toucan_left.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ CONFIG_ZMK_POINTING=y
33
# The pinnacle driver also requires this to include sleep code
44
CONFIG_ZMK_MOUSE=y
55

6+
# Fix stack overflow error when using input behaviors in zmk 0.3
7+
# See: https://github.com/zmkfirmware/zmk/issues/2669
8+
CONFIG_INPUT_THREAD_STACK_SIZE=2048
9+
610
CONFIG_ZMK_BATTERY_REPORTING=y
711
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
812
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y
@@ -23,3 +27,6 @@ CONFIG_ZMK_IDLE_TIMEOUT=30000
2327
# We use this because we need ZMK_PM, PM_DEVICE and ZMK_PM_DEVICE_SUSPEND_RESUME to get proper sleep notifications into the cirque driver
2428
# since we need all that might as well also turn on SOFT_OFF (which implies all these things but adds an optional SOFT_OFF feature)
2529
CONFIG_ZMK_PM_SOFT_OFF=y
30+
31+
# Enable ZMK Studio
32+
CONFIG_ZMK_STUDIO=y

boards/shields/toucan/toucan_right.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ CONFIG_ZMK_POINTING=y
33
# The pinnacle driver also requires this to include sleep code
44
CONFIG_ZMK_MOUSE=y
55

6+
# Fix stack overflow error when using input behaviors in zmk 0.3
7+
# See: https://github.com/zmkfirmware/zmk/issues/2669
8+
CONFIG_INPUT_THREAD_STACK_SIZE=2048
9+
610
CONFIG_ZMK_BATTERY_REPORTING=y
711
# CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
812
# CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y
@@ -29,3 +33,6 @@ CONFIG_ZMK_IDLE_TIMEOUT=30000
2933
# We use this because we need ZMK_PM, PM_DEVICE and ZMK_PM_DEVICE_SUSPEND_RESUME to get proper sleep notifications into the cirque driver
3034
# since we need all that might as well also turn on SOFT_OFF (which implies all these things but adds an optional SOFT_OFF feature)
3135
CONFIG_ZMK_PM_SOFT_OFF=y
36+
37+
# Enable ZMK Studio
38+
CONFIG_ZMK_STUDIO=y

boards/shields/toucan/toucan_right.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
spi-max-frequency = <1000000>;
6363
status = "okay";
6464
dr-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH)>;
65-
sensitivity = "2x";
65+
sensitivity = "3x";
6666
x-invert;
6767

6868
// Optional: turning this on enables very aggressive power saving, after 5 seconds with no touches

config/toucan.keymap

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
#include <dt-bindings/zmk/bt.h>
33
#include <dt-bindings/zmk/keys.h>
44
#include <dt-bindings/zmk/pointing.h>
5+
#include <input/processors.dtsi>
56

67
#define BASE 0
78
#define NAV 1
89
#define SYM 2
910
#define ADJ 3
11+
#define TAP 4
1012

1113
/ {
1214
conditional_layers { compatible = "zmk,conditional-layers"; };
@@ -46,6 +48,14 @@
4648
};
4749

4850
behaviors {
51+
touch_processor: touch_processor {
52+
compatible = "zmk,behavior-input-processor";
53+
#input-processor-cells = <0>;
54+
type = <INPUT_PROC_CODE_TYPE_DEVICE_EVENT>;
55+
codes = <INPUT_EV_KEY INPUT_BTN_TOUCH>;
56+
bindings = <&tog TAP>;
57+
};
58+
4959
mt_d: mt_d {
5060
compatible = "zmk,behavior-hold-tap";
5161
label = "MT_D";
@@ -110,5 +120,16 @@
110120
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
111121
>;
112122
};
123+
124+
tap {
125+
display-name = "TAP";
126+
bindings = <
127+
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &mkp LCLK &mkp RCLK &trans &trans
128+
>;
129+
};
130+
};
131+
132+
glidepoint_split {
133+
input-processors = <&touch_processor>;
113134
};
114135
};

config/west.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ manifest:
1515
remote: zmkfirmware
1616
import: app/west.yml
1717
- name: cirque-input-module
18-
remote: geeksville
19-
revision: toucan
18+
remote: petejohanson
19+
revision: main
2020
- name: zmk-rgbled-widget
2121
remote: caksoylar
2222
revision: main

0 commit comments

Comments
 (0)