Skip to content

Commit

Permalink
Build: Switch to new trackpoint driver module from zmk fork
Browse files Browse the repository at this point in the history
  • Loading branch information
infused-kim committed Apr 15, 2024
1 parent 433cc73 commit f6eed28
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/boards/shields/think_corney/think_corney.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ nice_view_spi: &spi0 {
};

mouse_ps2_input_listener: mouse_ps2_input_listener {
compatible = "zmk,input-listener";
compatible = "zmk,input-listener-ps2";
status = "disabled";

device = <&mouse_ps2>;
Expand Down
41 changes: 39 additions & 2 deletions config/think_corney.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,50 @@ CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000

#
# Configure PS2 Mouse Settings
# Configure PS2 Mouse / Trackpoint Driver Settings
#

# Enable compatibility with urob's zmk fork:
# https://github.com/urob/zmk
#
# Urob's fork is a popular way to beta test zmk's mouse keys without
# maintaining your own fork.
#
# But some of his additions also introduce changes that make some zmk
# "APIs" incompatible with zmk main and produce compile errors.
#
# Enable this option to make the PS2 mouse driver compatible with his
# fork.
# CONFIG_ZMK_INPUT_MOUSE_PS2_ENABLE_UROB_COMPAT=n

# Enable additional error mitigations to prevent cursor jumps
# Disabled by default and only recommended if using the GPIO PS2 driver
# CONFIG_ZMK_INPUT_MOUSE_PS2_ENABLE_ERROR_MITIGATION=n
# CONFIG_ZMK_INPUT_MOUSE_PS2_ENABLE_ERROR_MITIGATION=y

# Enable the PS2 protocol driver to report transmission errors to the mouse
# driver. This way the mouse driver can re-align its command buffer and reduce
# unexpected clicks or mouse movement in cases when the controller can't keep
# up with the data from the mouse or trackpoint.
#
# This setting is not necessary when using the PS2 UART driver, but is very
# helpful for the PS2 GPIO driver, because that driver experiences connection
# errors much more frequently.
#
# But this option requires zmk to be built with a forked zephyr that contains
# the following commit: `drivers: ps2: Add resend callback to ps/2 interface`
#
# You can find it here:
# https://github.com/infused-kim/zmk-zephyr/tree/dev/ps2_resend_callback_only
#
# I won't keep this branch updated, so just cherry pick the commit onto the
# latest zephyr branch zmk uses.
#
# TLDR: You don't need this unless you use the PS2 GPIO driver and you really
# shouldn't use that driver unless the PS2 UART driver doesn't work. And if
# it doesn't work, then it's better to find a solution to that than to use
# this.
# CONFIG_PS2_GPIO_ENABLE_PS2_RESEND_CALLBACK=y
# CONFIG_PS2_UART_ENABLE_PS2_RESEND_CALLBACK=y

#
# System Settings
Expand Down
2 changes: 1 addition & 1 deletion config/think_corney.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define KEYS_T LH2 LH1 LH0 RH0 RH1 RH2

/* Enable keymap features that require forks */
#define HAS_UROB
// #define HAS_UROB
#define HAS_MOUSE_KEYS
#define HAS_MOUSE_TP
// #define HAS_CAPSLOCK
Expand Down
7 changes: 6 additions & 1 deletion config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ manifest:
url-base: https://github.com/urob
- name: infused-kim
url-base: https://github.com/infused-kim
- name: petejohanson
url-base: https://github.com/petejohanson
projects:
- name: zmk
remote: infused-kim
revision: pr-testing/mouse_ps2_v2
revision: pr-testing/mouse_ps2_module_base
import: app/west.yml
- name: kb_zmk_ps2_mouse_trackpoint_driver
remote: infused-kim
revision: main
self:
path: config

0 comments on commit f6eed28

Please sign in to comment.