diff --git a/boards/shields/think_corney/Kconfig.defconfig b/boards/shields/think_corney/Kconfig.defconfig deleted file mode 100644 index 95659dcf..00000000 --- a/boards/shields/think_corney/Kconfig.defconfig +++ /dev/null @@ -1,18 +0,0 @@ -# The side with the PS2 Mouse / TP has to be the central half - -if SHIELD_THINK_CORNEY_RIGHT - -config ZMK_KEYBOARD_NAME - default "ThinkCorney" - -config ZMK_SPLIT_ROLE_CENTRAL - default y - -endif - -if SHIELD_THINK_CORNEY_LEFT || SHIELD_THINK_CORNEY_RIGHT - -config ZMK_SPLIT - default y - -endif diff --git a/boards/shields/think_corney/Kconfig.shield b/boards/shields/think_corney/Kconfig.shield deleted file mode 100644 index ec3f8657..00000000 --- a/boards/shields/think_corney/Kconfig.shield +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2020 Pete Johanson -# SPDX-License-Identifier: MIT - -config SHIELD_THINK_CORNEY_LEFT - def_bool $(shields_list_contains,think_corney_left) - -config SHIELD_THINK_CORNEY_RIGHT - def_bool $(shields_list_contains,think_corney_right) diff --git a/boards/shields/think_corney/think_corney.dtsi b/boards/shields/think_corney/think_corney.dtsi deleted file mode 100644 index 54d8109d..00000000 --- a/boards/shields/think_corney/think_corney.dtsi +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include - -/* - * Matrix - */ - -/ { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; - map = < -RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) -RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) -RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) - RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) - >; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - - diode-direction = "col2row"; - row-gpios - = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - - }; -}; - -/* - * Nice!View - */ - -&pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; -}; - -nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&pro_micro 9 GPIO_ACTIVE_HIGH>; // Not the default 1 -}; - -&pro_micro_i2c { - status = "disabled"; -}; diff --git a/boards/shields/think_corney/think_corney.zmk.yml b/boards/shields/think_corney/think_corney.zmk.yml deleted file mode 100644 index 4f414d59..00000000 --- a/boards/shields/think_corney/think_corney.zmk.yml +++ /dev/null @@ -1,12 +0,0 @@ -file_format: "1" -id: think_corney -name: ThinkCorney -type: shield -url: https://github.com/infused-kim/kb_think_corney -requires: [pro_micro] -features: - - keys - - display -siblings: - - think_corney_left - - think_corney_right diff --git a/boards/shields/think_corney/think_corney_left.conf b/boards/shields/think_corney/think_corney_left.conf deleted file mode 100644 index e69de29b..00000000 diff --git a/boards/shields/think_corney/think_corney_left.overlay b/boards/shields/think_corney/think_corney_left.overlay deleted file mode 100644 index 1d46eb27..00000000 --- a/boards/shields/think_corney/think_corney_left.overlay +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include "think_corney.dtsi" - -/* - * Matrix - */ - -&kscan0 { - col-gpios - = <&pro_micro 21 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - ; -}; diff --git a/boards/shields/think_corney/think_corney_right.conf b/boards/shields/think_corney/think_corney_right.conf deleted file mode 100644 index e69de29b..00000000 diff --git a/boards/shields/think_corney/think_corney_right.overlay b/boards/shields/think_corney/think_corney_right.overlay deleted file mode 100644 index df5bc4dd..00000000 --- a/boards/shields/think_corney/think_corney_right.overlay +++ /dev/null @@ -1,546 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson - * - * SPDX-License-Identifier: MIT - */ - -#include "think_corney.dtsi" - -/* - * Matrix - */ - -&default_transform { - col-offset = <6>; -}; - -&kscan0 { - col-gpios - = <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - , <&pro_micro 18 GPIO_ACTIVE_HIGH> - , <&pro_micro 19 GPIO_ACTIVE_HIGH> - , <&pro_micro 20 GPIO_ACTIVE_HIGH> - , <&pro_micro 21 GPIO_ACTIVE_HIGH> - ; -}; - - -/* - * PS/2 Mouse / Trackpoint - User Configuration - * - * Enable PS/2 drivers on this side of the keyboard. - * It MUST be the central half. If you connected your TP or mouse to the - * left side, then move the following content to `your_keyboard_left.overlay` - * - * You also need to adjust `Kconfig.defconfig` and configure that this side - * is the central side. - * - */ - - -// Pick the PS/2 driver -// -// Comment out the following define to use the PS/2 GPIO driver instead of the -// UART driver. -// -// Both, the UART and GPIO drivers, implement the PS/2 protocol and work with -// trackpoints and other mouse devices that use PS/2. -// -// The only difference is which hardware they use on your controller to -// transmit the data. The UART driver has MUCH better performance and should -// be used by most people. -// -// The GPIO driver should only be used if your PS/2 pointing device uses a -// clock frequency rate that is not compatible with the UART baud rates. Or -// if you are NOT using a nrf52-based controller, such as the nice!nano, -// nice!nano clone or a seeduino xiao. -// -// In all other cases you should try using the UART driver first. -#define MOUSE_PS2_DRIVER_UART - - -// Configure the SCL and SDA pins using the`&pro_micro` notation. -// -// If possible, try to choose the blue high frequency pins to avoid -// bluetooth interference. -// -// It will still work even if you pick low frequency pins, but there is a risk -// that the trackpoint could cause bluetooth interference. -// -// On the nice!nano documentation these are green DX pins: -// https://nicekeyboards.com/docs/nice-nano/pinout-schematic -// -// The ideal pins are... -// - D1 and D0 for clock and data, because they are high frequency. -// - D8, D9, D16 or D10 for the trackpoint reset pin, because it doesn't -// need to be high frequency (only needed if you are not using a reset -// circuit) -// -// But on the corne keyboard, these pins are used for the backlight. So, this -// example config uses the pins D16 and D10 for clock and data and -// D9 for the reset circuit. -#define MOUSE_PS2_PIN_SCL_PRO_MICRO <&pro_micro 1 GPIO_ACTIVE_HIGH> -#define MOUSE_PS2_PIN_SDA_PRO_MICRO <&pro_micro 0 GPIO_ACTIVE_HIGH> - -// Configure the Power-On-Reset pin -// -// Uncomment and configure this pin if you have an extra free pin and want the -// controller to perform the Power-On-Reset sequence, which many trackpoints -// require. -// -// You don't need this if you are not using a trackpoint or if you have a -// trackpoint reset circuit. -// -// It's ok to use a low-frequency pin for this. -// #define MOUSE_PS2_PIN_RST_PRO_MICRO <&pro_micro 9 GPIO_ACTIVE_HIGH> - - -// Configure SDA pin using the pinctrl notation -// -// Now configure SDA pin using the pinctrl notation. Make sure to use the same -// pin as in the pro micro notation, but convert it to the pinctrl notation. -// -// For the nice!nano you can find it on their pinout schematic, next to the -// pins, in the blue or violet boxes, with a format like `PX.YY` (P0.09). -// -// Enter it like `X, Y` without leading zeroes. -// -// Examples: -// D1 - P0.06: 0, 6 -// D0 - P0.08: 0, 8 -// D15 - P1.13: 1, 13 -// D16 - P0.10: 0, 10 -// D10 - P0.09: 0, 9 -// -// We don't define the SCL pin, because UART uses a baud rate instead of -// a clock pin. -#define MOUSE_PS2_PIN_SDA_PINCTRL - -// Configure UART BAUD Rate -// -// TLDR WARNING: -// Most likely you won't need to adjust this. So leave it at the default value -// of 14,400 and test if your mouse or trackpoint works. -// -// If it doesn't work, try using the GPIO version of the driver. If it works -// with the GPIO driver, then try using the UART driver with the BAUD rates -// 19,200 and 9,600. -// -// So far, all the trackpoints, which the community tested, worked with the -// 14,400 rate. -// -// Explanation what this is: -// -// PS/2 uses a clock pin to syncronize data transmissions. UART on the -// other hand uses a pre-defined frequency (baud rate). -// -// Fortunately, one of the available baud rates is very close to the -// frequency used in IBM/Lenovo trackpoints. -// -// You can find other configurable baud rates here: -// https://docs.zephyrproject.org/latest/build/dts/api/bindings/serial/nordic,nrf-uarte.html -// -// You can also measure the frequency of your mouse/TP using a $5 logic -// analyzer from AliExpress. -// -// Actual frequency of PS/2 trackpoint: 67us -// Corresponding baud rate: 14,925 -// -// Closest available baud rate in zephyr: 14,400 -// Corresponding cycle length: 69.44 microseconds -// -// Calculations: -// -// Convert cycle length in microseconds into baud: -// 1 / PS2_CYCLE_LENGTH * 1000000 = BAUD -// 1 / 67 * 1000000 = 14,925 BAUD -// -// Convert baud into cycle length: -// 1 / BAUD * 1000000 = CYCLE_LEN (in microseconds) -// 1 / 14400 * 1000000 = 69.44 -// -// Most likely values -// -// The PS/2 protocol specifies that devices must use a clock line -// frequency in the range of 10 - 16.7 kHz. -// -// Most trackpoints seem to operate at around 14-15kHz. -// -// Therefore, the most likely values to try are: -// - 14400 ( 69 us cycle length / 14.5kHz) -// - 9600 (100 us cycle length / 10.0kHz) -// - 19200 ( 52 us cycle length / 19kHz) -#define MOUSE_PS2_UART_BAUD_RATE <14400> - - -/* - * PS/2 Mouse / Trackpoint - User Configuration if NOT using nice!nano - * - * WARNING: Do NOT change this if you are using a nice!nano v2 or clone. - */ - -// Unexposed UART pins -// In UART two different pins are used for receiving and transmitting, but PS/2 -// uses the same pin for both. -// -// The UART config still requires both pins to be configured. So we use one of -// the nrf52 pins that are not exposed on the nice!nano board. -// -// Do NOT change these if you are using a nice!nano (or a clone of it) -#define MOUSE_PS2_PIN_UNEXPOSED_TX -#define MOUSE_PS2_PIN_UNEXPOSED_RX - - -// Adjust GPIO interrupt priority to the highest level. -// -// IMPORTANT TLDR: -// If you are using the nice_nano_v2 board, you don't need to make changes to -// the config below and can leave it as it is. -// -// Explanation of these settings: -// -// PS/2 events must be processed within 30-50us, but frequently bluetooth and -// other interrupts take longer to finish. -// -// Therefore we change the default GPIO priority to the highest level (0) and -// demote all BT interrupt priorities by one level using the kconfig settings: -// - CONFIG_BT_CTLR_LLL_PRIO 1 -// - CONFIG_BT_CTLR_ULL_HIGH_PRIO 2 -// - CONFIG_BT_CTLR_ULL_LOW_PRIOCONFIG 2 -// -// These config options are enabled automatically by the PS2 UART and GPIO -// drivers... so you don't have to enable them manually. -// -// Then we lower the interrupt priority of all other devices by 2 levels using -// the devicetree config below. -// -// This allows the PS/2 interrupts to be triggered faster and reduces -// transmission errors. -// -// If you are using the nice_nano_v2 board, you can reuse my config below. -// -// Otherwise, you can generate the interrupt overrides using this script: -// https://github.com/infused-kim/kb_zmk_ps2_mouse_trackpoint_driver/blob/main/scripts/gen_interrupt_priority_overrides.py -// -// Make sure to do it on a zephyr.dts where the interrupts have not been -// adjusted yet (i.e. a config that doesn't have the the following options -// enabled). -// -// If you are building using a toolchain you can find the zephyr.dts in the -// build directory, which by default is: `app/build/zephyr/zephyr.dts` -// -// If you are building using the github actions, copy the output of the build -// step `xxxx_right - nice_nano_v2 Devicetree file` into a file and run the -// script on it. - -// gpiote should have the highest interrupt priority (0) -&gpiote { - interrupts = < 6 0 >; -}; - -// All other priorities should be two levels lower than their defaults -// (which is usually 1 and should be demoted to 3) -&clock { - interrupts = < 0 3 >; -}; - -&power { - interrupts = < 0 3 >; -}; - -&radio { - interrupts = < 1 3 >; -}; - -&uart0 { - interrupts = < 2 3 >; -}; - -&i2c0 { - interrupts = < 3 3 >; -}; - -&spi0 { - interrupts = < 3 3 >; -}; - -&i2c1 { - interrupts = < 4 3 >; -}; - -&spi1 { - interrupts = < 4 3 >; -}; - -&nfct { - interrupts = < 5 3 >; -}; - -&adc { - interrupts = < 7 3 >; -}; - -&timer0 { - interrupts = < 8 3 >; -}; - -&timer1 { - interrupts = < 9 3 >; -}; - -&timer2 { - interrupts = < 10 3 >; -}; - -&rtc0 { - interrupts = < 11 3 >; -}; - -&temp { - interrupts = < 12 3 >; -}; - -&rng { - interrupts = < 13 3 >; -}; - -&ecb { - interrupts = < 14 3 >; -}; - -&ccm { - interrupts = < 15 3 >; -}; - -&wdt { - interrupts = < 16 3 >; -}; - -&rtc1 { - interrupts = < 17 3 >; -}; - -&qdec { - interrupts = < 18 3 >; -}; - -&comp { - interrupts = < 19 3 >; -}; - -&egu0 { - interrupts = < 20 3 >; -}; - -&egu1 { - interrupts = < 21 3 >; -}; - -&egu2 { - interrupts = < 22 3 >; -}; - -&egu3 { - interrupts = < 23 3 >; -}; - -&egu4 { - interrupts = < 24 3 >; -}; - -&egu5 { - interrupts = < 25 3 >; -}; - -&timer3 { - interrupts = < 26 3 >; -}; - -&timer4 { - interrupts = < 27 3 >; -}; - -&pwm0 { - interrupts = < 28 3 >; -}; - -&pdm0 { - interrupts = < 29 3 >; -}; - -&pwm1 { - interrupts = < 33 3 >; -}; - -&pwm2 { - interrupts = < 34 3 >; -}; - -&spi2 { - interrupts = < 35 3 >; -}; - -&rtc2 { - interrupts = < 36 3 >; -}; - -&i2s0 { - interrupts = < 37 3 >; -}; - -&usbd { - interrupts = < 39 3 >; -}; - -&uart1 { - interrupts = < 40 3 >; -}; - -&qspi { - interrupts = < 41 3 >; -}; - -&pwm3 { - interrupts = < 45 3 >; -}; - -&spi3 { - interrupts = < 47 3 >; -}; - -&cryptocell { - interrupts = < 42 3 >; -}; - - -/* - * PS/2 Mouse / Trackpoint - Device Definitions - * - * WARNING: Do not change anything beyond here unless you know what you are - * doing. - */ - - -// Firmware with alternative pins -// -// This can safely be removed. It's only used in the example zmk-config repo -// to create an additional firmware with alternative PIN assignments. -// -// You can leave it or remove in your own zmk config. If you remove it, you -// should also remove the entry in `zmk-config-example/build.yaml` that uses -// it. -#ifdef MOUSE_PS2_ALT_PINS - #undef MOUSE_PS2_PIN_SCL_PRO_MICRO - #undef MOUSE_PS2_PIN_SDA_PRO_MICRO - #undef MOUSE_PS2_PIN_SDA_PINCTRL - - #define MOUSE_PS2_PIN_SCL_PRO_MICRO <&pro_micro 1 GPIO_ACTIVE_HIGH> - #define MOUSE_PS2_PIN_SDA_PRO_MICRO <&pro_micro 0 GPIO_ACTIVE_HIGH> - #define MOUSE_PS2_PIN_SDA_PINCTRL -#endif - -// This define can be used in the keymap file to check whether the device tree -// configs in this file are present to void build errors on the side that does -// not have the mouse or TP -#define MOUSE_PS2_DT_PRESENT - -&pinctrl { - // This pinctrl state is used for receiving - // For `UART_TX`, set an unused and unexposed pin - // For `UART_RX`, set the PS/2 SDA pin number - uart0_ps2_default: uart0_ps2_default { - group1 { - psels = MOUSE_PS2_PIN_UNEXPOSED_TX, - MOUSE_PS2_PIN_SDA_PINCTRL; - }; - }; - - // Set this to the same pins as uart0_ps2_default - uart0_ps2_sleep: uart0_ps2_sleep { - group1 { - psels = MOUSE_PS2_PIN_UNEXPOSED_TX, - MOUSE_PS2_PIN_SDA_PINCTRL; - low-power-enable; - }; - }; - - // The nrf52 UART controller is not compatible with the PS/2 - // transmission frame. So the PS/2 UART driver doesn't use UART for - // transmissions and instead use GPIO bit-banging. - // - // When the driver switches to transmit mode, it frees up the SDA pin by - // switching the UART controller to unexposed/unused pins. - // - // Then it configures the GPIO controller to use the SCL and SDA pins - uart0_ps2_off: uart0_ps2_off { - group1 { - psels = MOUSE_PS2_PIN_UNEXPOSED_TX, - MOUSE_PS2_PIN_UNEXPOSED_RX; - }; - }; -}; - - -#ifdef MOUSE_PS2_DRIVER_UART - - &uart0 { - status = "disabled"; - compatible = "nordic,nrf-uarte"; - - current-speed = MOUSE_PS2_UART_BAUD_RATE; - pinctrl-0 = <&uart0_ps2_default>; - pinctrl-1 = <&uart0_ps2_off>; - - pinctrl-names = "default", "sleep"; - - uart_ps2: uart_ps2 { - status="disabled"; - compatible = "uart-ps2"; - scl-gpios = MOUSE_PS2_PIN_SCL_PRO_MICRO; - sda-gpios = MOUSE_PS2_PIN_SDA_PRO_MICRO; - }; - }; - -#else - - / { - gpio_ps2: gpio_ps2 { - status = "disabled"; - - compatible = "gpio-ps2"; - scl-gpios = MOUSE_PS2_PIN_SCL_PRO_MICRO; - sda-gpios = MOUSE_PS2_PIN_SDA_PRO_MICRO; - }; - }; - -#endif - - -/ { - mouse_ps2: mouse_ps2 { - status = "disabled"; - compatible = "zmk,input-mouse-ps2"; - -#ifdef MOUSE_PS2_DRIVER_UART - ps2-device = <&uart_ps2>; -#else - ps2-device = <&gpio_ps2>; -#endif - -#ifdef MOUSE_PS2_PIN_RST_PRO_MICRO - rst-gpios = MOUSE_PS2_PIN_RST_PRO_MICRO; -#endif - }; - - mouse_ps2_input_listener: mouse_ps2_input_listener { - compatible = "zmk,input-listener-ps2"; - status = "disabled"; - - device = <&mouse_ps2>; - - // Some of the available settings depend on the keymap. So they - // are adjusted in... - // zmk-config/config/includes/mouse_tp.dtsi - }; -}; diff --git a/build.yaml b/build.yaml index 6b993bd3..7ab5d6a7 100644 --- a/build.yaml +++ b/build.yaml @@ -13,11 +13,6 @@ # --- include: - - board: nice_nano_v2 - shield: think_corney_left nice_view - - board: nice_nano_v2 - shield: think_corney_right nice_peri_view - - board: nice_nano_v2 shield: corne_left - board: nice_nano_v2 diff --git a/config/base.keymap b/config/base.keymap index 05f9be75..9ff7325b 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -45,9 +45,6 @@ #include "includes/behaviours_mod_morph.dtsi" #include "includes/behaviours_other.dtsi" #include "includes/mouse_keys.dtsi" -#include "includes/mouse_tp.dtsi" -#include "includes/mouse_tp_badjeff_input_listener.dtsi" - #ifdef HAS_MOUSE_TP #define U_TOG_TP_SET &tog MOUSE_TP_SET diff --git a/config/corne.keymap b/config/corne.keymap index 072e3aee..72802fc0 100644 --- a/config/corne.keymap +++ b/config/corne.keymap @@ -9,7 +9,7 @@ // #define HAS_UROB #define HAS_TRI_STATE -#define HAS_MOUSE_KEYS +// #define HAS_MOUSE_KEYS // #define HAS_MOUSE_TP // #define HAS_CAPSLOCK diff --git a/config/includes/mouse_tp.dtsi b/config/includes/mouse_tp.dtsi deleted file mode 100644 index 219a8f0e..00000000 --- a/config/includes/mouse_tp.dtsi +++ /dev/null @@ -1,246 +0,0 @@ -#ifdef HAS_MOUSE_TP - #include - #include - #include - #include - - /* - * Key Behaviors to adjust settings - */ - - // They key codes below can be used to adjust the TP settings at runtime - // without needing to recompile the firmware. - // - // The values will be logged and saved in the config on the controller flash - // after 60s (CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE). - // - // On boot the settings will be restored again. - // - // If you prefer a more explicit way of configuration, you can also hardcode - // these settings in `&mouse_ps2`. - // - // If you set these settings in `&mouse_ps2`, you will still be able to - // adjust the values during runtime with these key codes, but after - // restarting the board the values in `&mouse_ps2` will be restored and not - // the ones stored in the flash using the key codes. - - - // How sensitive the trackpoint is - #define U_MSS_TP_S_I &mms MS_TP_SENSITIVITY_INCR - #define U_MSS_TP_S_D &mms MS_TP_SENSITIVITY_DECR - - - // The maximum speed the trackpoint will accelerate to - #define U_MSS_TP_V6_I &mms MS_TP_VALUE6_INCR - #define U_MSS_TP_V6_D &mms MS_TP_VALUE6_DECR - - - // I am not quite sure tbh... default seems fine. - #define U_MSS_TP_NI_I &mms MS_TP_NEG_INERTIA_INCR - #define U_MSS_TP_NI_D &mms MS_TP_NEG_INERTIA_DECR - - - // How hard you have to press to activate the "Press To Select" feature that - // lets you tap or press on the trackpoint to click. - // - // Not all trackpoints support it and you have to enable - // `tp-press-to-select;` in `&mouse_ps2` first. - #define U_MSS_TP_PT_I &mms MS_TP_PTS_THRESHOLD_INCR - #define U_MSS_TP_PT_D &mms MS_TP_PTS_THRESHOLD_DECR - - - // If you mess up the settings, you can use this key code to clear the - // settings from flash and re-set the default values on the TP. - // - // Make sure to wait at least CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE seconds (60 - // by default) before restarting the board to ensure the settings are - // written to flash storage. - #define U_MSS_RESET &mms MS_RESET - - - // If you prefer to set the settings in `&mouse_ps2`, you can use the key - // codes above to find the settings you like the most and then press this - // key code to output the settings to the log. - // - // Then you can add those values to `&mouse_ps2` - - - - #define U_MSS_LOG &mms MS_LOG - - - // Only apply these settings on the side that has the TP connected - // (usually the right side) - #ifdef MOUSE_PS2_DT_PRESENT - - #define PS2_MOUSE_SAMPLING_RATE 100 - - /* - * Input Accelerator Config - */ - - / { - input_accelerator_move: input_accelerator_move { - status = "okay"; - compatible = "zmk,input-accelerator"; - - acceleration-curve = "sigmoid"; - acceleration-factor-base = <80>; - acceleration-factor-max = <130>; - acceleration-factor-rate = <40>; - acceleration-start-offset = <5>; - max-speed = <50>; - - enable-interval-based-speed; - input-default-sending-rate = ; - }; - - input_accelerator_scroll: input_accelerator_scroll { - status = "okay"; - compatible = "zmk,input-accelerator"; - - acceleration-curve = "scroll"; - acceleration-factor-rate = <25>; - acceleration-start-offset = <10>; - max-speed = <20>; - divisor = <20>; - - enable-interval-based-speed; - input-default-sending-rate = ; - }; - }; - - /* - * Input Listener Config - */ - - &mouse_ps2_input_listener { - move-accelerator = <&input_accelerator_move>; - scroll-accelerator = <&input_accelerator_scroll>; - - scroll-layers = ; - scroll-layers-reverse-direction-horizontal; - - xy-swap; - x-invert; - y-invert; - - // Set the layer that should automatically activate when the mouse is - // moving. - layer-toggle = ; - - // How long the mouse needs to move for before the layer is activated (to - // avoid accidental activations while typing) (Default: 250) - layer-toggle-delay-ms = <250>; - - // How long to wait, after the last mouse movement, before deactivating - // the layer (Default: 250) - layer-toggle-timeout-ms = <150>; - - // Require at least this amount of time since the last key tap to - // activate the layer toggle. Prevents activations of the mouse layer - // when you accidentally touch the TrackPoint while typing - layer-toggle-require-prior-idle-ms = <200>; - }; - - - /* - * Mouse Driver Settings - */ - - &mouse_ps2 { - - // How sensitive the TP is (Default: 128) - // tp-sensitivity = <48>; - - - // The maximum mouse movement speed the TP will accelarate to - // (Default: 97) - // tp-val6-upper-speed = <130>; - - - // Not quite sure what it does tbh :) (Default: 6) - // tp-neg-inertia = <6>; - - - // Enable clicking by tapping on the TP. - // Not all TPs support this. - // tp-press-to-select; - // tp-press-to-select-threshold = <10>; - - - // Adjust axis settings on the TP - // Works only on some trackpoints, but may be properly considered by the - // trackpoint's acceleration features (which may or may not have an - // impact). - // - // Alternatively consider achieving the same effect using the - // `input-listener` settings below. - // tp-xy-swap; - // tp-x-invert; - // tp-y-invert; - - - // Set sampling rate - // - // The frequency at which the mouse samples and sends data (in hz). - // The default rate is 100. You can try lowering it if you experience - // connection errors. - // - // Higher values than 100 are no improvement in my experience, but will - // increase battery life and potentially errors in transmissions. - // - // These values are allowed: 10,20,40,60,80,100,200 - // - // If you are using mouse acceleration, please make sure to set the - // same value for the input-default-sending-rate option. - // sampling-rate = ; - - - // Disables clicking. - // Useful when using the PS2 GPIO driver that is prone to - // erros in transmissions to reduce accidental clicks. - // disable-clicking; - - - // Enable scroll wheel - // For mouse devices supporting the Intellimouse extension. Not relevant - // for trackpoints - // scroll-mode; - - }; - - // Enable PS/2 Mouse Devices - // In `your_keyboard_right.overlay` all devices have `status = "disabled"`. - // So,they are never compiled into the firmware. - // - // Here we enable them, but we do it within the #ifdef HAS_MOUSE_TP code - // block, which allows to prevent compilation and potential build errors - // when we undefine HAS_MOUSE_TP in corne_tp.keymap - &mouse_ps2 { - status = "okay"; - }; - - &mouse_ps2_input_listener { - status = "okay"; - }; - - #ifdef MOUSE_PS2_DRIVER_UART - - &uart0 { - status = "okay"; - }; - - &uart_ps2 { - status="okay"; - }; - - #else - - &gpio_ps2 { - status = "okay"; - }; - - #endif // MOUSE_PS2_DRIVER_UART - #endif // MOUSE_PS2_DT_PRESENT -#endif // HAS_MOUSE_TP diff --git a/config/includes/mouse_tp_badjeff_input_listener.dtsi b/config/includes/mouse_tp_badjeff_input_listener.dtsi deleted file mode 100644 index 93f8e4e0..00000000 --- a/config/includes/mouse_tp_badjeff_input_listener.dtsi +++ /dev/null @@ -1,80 +0,0 @@ -// Important: -// Make sure this file is included AFTER `mouse_tp.dtsi`. - -#ifdef HAS_MOUSE_TP_BADJEFF_INPUT_LISTENER - #ifdef HAS_MOUSE_TP - - // Disable original input listener - &mouse_ps2_input_listener { - status = "disabled"; - }; - - / { - // Badjeff's input listener for mouse movement - mouse_ps2_input_listener_move { - compatible = "zmk,input-behavior-listener"; - device = <&mouse_ps2>; - - // The TP will move the mouse on all layers except for - // SYM and NAV - layers = < - BASE - BASE_QWERTY - NUM_WORD - NAV - NUM - FUNC - ADJUST - LOWER - MOUSE_KEYS - MOUSE_TP - MOUSE_TP_SET - >; - - // Auto toggle Mouse_TP layer when the mouse moves - bindings = <&mouse_ps2_move_tog_layer MOUSE_TP>; - - // Use mouse movement event codes - evt-type = ; - x-input-code = ; - y-input-code = ; - - scale-multiplier = <1>; - scale-divisor = <1>; - }; - - // Input listener for scrolling - mouse_ps2_input_listener_scroll { - compatible = "zmk,input-behavior-listener"; - device = <&mouse_ps2>; - - // The TP will scroll only on the SYM layer - layers = < - SYM - SYM_WORD - NAV - NAV_WORD - >; - - // Use scroll event codes - evt-type = ; - x-input-code = ; - y-input-code = ; - - // Slow down the scrolling - scale-multiplier = <1>; - scale-divisor = <8>; - - // Invert scroll direction - y-invert; - }; - - mouse_ps2_move_tog_layer: mouse_ps2_move_tog_layer { - compatible = "zmk,input-behavior-tog-layer"; - #binding-cells = <1>; - time-to-live-ms = <500>; - }; - }; - - #endif // HAS_MOUSE_TP -#endif // HAS_MOUSE_TP_BADJEFF_INPUT_LISTENER diff --git a/config/think_corney.conf b/config/think_corney.conf deleted file mode 100644 index 125299cd..00000000 --- a/config/think_corney.conf +++ /dev/null @@ -1,105 +0,0 @@ -# -# Display -# - -# CONFIG_ZMK_DISPLAY=y -# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y -# CONFIG_ZMK_WIDGET_WPM_STATUS=n - -CONFIG_NICE_PERI_VIEW_RIGHT_SIDE_CENTRAL=y -CONFIG_NICE_PERI_VIEW_SHOW_SLEEP_ART_ON_IDLE=n - -# Use default display instead of nice!view custom screen -# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -# CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -# CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - -# -# Deep Sleep after 15min of inactivity -# - -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000 - -# -# 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 logging of mouse acceleration values -CONFIG_ZMK_INPUT_ACCELERATOR_LOG_ENABLED=y -CONFIG_CBPRINTF_COMPLETE=y - -# 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=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 -# - -# Save config to flash more frequently -# Default is 60s and this lowers it to 10 -# Only use this setting for debugging. -# Prolonged use can lead to flash chip degradation -CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE=10000 - -# Enable experimental BLE settings to improve performance on BT -CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y -CONFIG_ZMK_BLE_THREAD_PRIORITY=3 -CONFIG_BT_PERIPHERAL_PREF_MIN_INT=8 -CONFIG_BT_PERIPHERAL_PREF_MAX_INT=8 - -# -# Logging -# - -# CONFIG_ZMK_USB_LOGGING=y # This is set in `_left.conf` and `_right.conf` - -CONFIG_ZMK_LOGGING_MINIMAL=y -CONFIG_PS2_LOG_LEVEL_DBG=n -CONFIG_UART_LOG_LEVEL_DBG=n -CONFIG_LOG_MODE_IMMEDIATE=n -CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=3000 -CONFIG_ZMK_RTT_LOGGING=n - - -CONFIG_THREAD_STACK_INFO=y -CONFIG_INIT_STACKS=y \ No newline at end of file diff --git a/config/think_corney.keymap b/config/think_corney.keymap deleted file mode 100644 index e704f54c..00000000 --- a/config/think_corney.keymap +++ /dev/null @@ -1,19 +0,0 @@ -// Source keypos definitions -#include "zmk-helpers/key-labels/42.h" - -#define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 -#define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 -#define KEYS_T LH2 LH1 LH0 RH0 RH1 RH2 - -/* Enable keymap features that require forks or modules */ -// #define HAS_UROB - -#define HAS_TRI_STATE -// #define HAS_CAPSLOCK - -#define HAS_MOUSE_KEYS -#define HAS_MOUSE_TP -// #define HAS_MOUSE_TP_BADJEFF_INPUT_LISTENER - -/* source the main keymap */ -#include "base.keymap" diff --git a/config/think_corney_left.conf b/config/think_corney_left.conf deleted file mode 100644 index ae8eb3a9..00000000 --- a/config/think_corney_left.conf +++ /dev/null @@ -1,5 +0,0 @@ -# -# Logging -# - -CONFIG_ZMK_USB_LOGGING=n diff --git a/config/think_corney_right.conf b/config/think_corney_right.conf deleted file mode 100644 index a369b054..00000000 --- a/config/think_corney_right.conf +++ /dev/null @@ -1,5 +0,0 @@ -# -# Logging -# - -CONFIG_ZMK_USB_LOGGING=y diff --git a/config/west.yml b/config/west.yml index 316bc7fc..9e852191 100644 --- a/config/west.yml +++ b/config/west.yml @@ -22,17 +22,17 @@ manifest: # Standard, stable zmk repo without mouse PR. # Not compatible with the PS/2 mouse & TP driver module. - # - name: zmk - # remote: zmkfirmware - # revision: main - # import: app/west.yml + - name: zmk + remote: zmkfirmware + revision: main + import: app/west.yml # infused-kim's zmk fork with mouse PR, which might be a bit outdated, but # is known to be compatible with the PS/2 mouse & TP driver module. - - name: zmk - remote: infused-kim - revision: pr-testing/mouse_ps2_module_base - import: app/west.yml + # - name: zmk + # remote: infused-kim + # revision: pr-testing/mouse_ps2_module_base + # import: app/west.yml # pete's zmk fork with the most up to date mouse PR, which is more # up-to-date, but may contain incompatibilities with the PS/2 mouse & TP @@ -62,14 +62,14 @@ manifest: # # Module for PS/2 mouse & TP driver - - name: kb_zmk_ps2_mouse_trackpoint_driver - remote: infused-kim - revision: dev/2024-04-acceleration + # - name: kb_zmk_ps2_mouse_trackpoint_driver + # remote: infused-kim + # revision: dev/2024-04-acceleration # zmk module for nice_peri_view - - name: tmp-npv - remote: infused-kim - revision: main + # - name: tmp-npv + # remote: infused-kim + # revision: main # Urob's zmk helpers that contain key position defines - name: zmk-helpers