diff --git a/app/Kconfig b/app/Kconfig index c14759802f4f..1f99c1987e64 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -383,10 +383,23 @@ config ZMK_TRACKPAD bool "Enable ZMK trackpad emulation" default n +config ZMK_TRACKPAD_MOUSE_MODE + bool "Enable optional additional mouse emulation" + default n + config ZMK_TRACKPAD_REVERSE_SCROLL bool "Reverse scroll direction of trackpad in mosue mode" default n +config ZMK_TRACKPAD_TICK_DURATION + int "Trackpad tick duration in ms" + default 8 + +config ZMK_TRACKPAD_MAX_FINGERS + int "Maximum number of fingers reported in PTP" + range 3 5 + default 5 + config ZMK_TRACKPAD_PHYSICAL_X int "Maximum X size of trackpad in 0.1cm increments" default 600 diff --git a/app/boards/arm/bt60/bt60_defconfig b/app/boards/arm/bt60/bt60_defconfig index a1b8c7ef0b01..3e1b3d7c96c0 100644 --- a/app/boards/arm/bt60/bt60_defconfig +++ b/app/boards/arm/bt60/bt60_defconfig @@ -16,6 +16,8 @@ CONFIG_ZMK_USB_LOGGING=y CONFIG_ZMK_MOUSE=y CONFIG_ZMK_TRACKPAD=y +CONFIG_ZMK_TRACKPAD_MOUSE_MODE=y +CONFIG_ZMK_TRACKPAD_TICK_DURATION=3 CONFIG_ZMK_TRACKPAD_PHYSICAL_X=650 CONFIG_ZMK_TRACKPAD_PHYSICAL_Y=1065 CONFIG_ZMK_TRACKPAD_LOGICAL_X=700 diff --git a/app/boards/arm/stp/stp_defconfig b/app/boards/arm/stp/stp_defconfig index dca4b9ab127a..90bdba891e2d 100644 --- a/app/boards/arm/stp/stp_defconfig +++ b/app/boards/arm/stp/stp_defconfig @@ -25,6 +25,7 @@ CONFIG_ZMK_USB_LOGGING=y CONFIG_I2C=y CONFIG_ZMK_MOUSE=y CONFIG_ZMK_TRACKPAD=y +CONFIG_ZMK_TRACKPAD_TICK_DURATION=3 CONFIG_ZMK_TRACKPAD_PHYSICAL_X=650 CONFIG_ZMK_TRACKPAD_PHYSICAL_Y=1065 CONFIG_ZMK_TRACKPAD_LOGICAL_X=700 diff --git a/app/src/hid.c b/app/src/hid.c index 95fde0cbe62e..f46eacb97e6d 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -79,7 +79,7 @@ struct zmk_hid_ptp_feature_certification_report ptp_feature_certification_report // Feature report for device capabilities struct zmk_hid_ptp_feature_capabilities_report ptp_feature_capabilities_report = { .report_id = ZMK_HID_REPORT_ID_FEATURE_PTP_CAPABILITIES, - .max_touches = 5, + .max_touches = CONFIG_ZMK_TRACKPAD_MAX_FINGERS, .pad_type = PTP_PAD_TYPE_NON_CLICKABLE}; #endif