Skip to content

Commit

Permalink
Disable horisontal scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed May 8, 2024
1 parent 2d33384 commit 3941746
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/boards/arm/stp/stp.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// ------------------------------------------------------------------------------------------------------------

bindings = <
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &mo 1 &kp DEL &kp INS
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &out OUT_USB &out OUT_BLE &mo 1 &kp DEL &kp INS
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BACKSPACE &kp HOME
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
Expand Down
9 changes: 6 additions & 3 deletions app/boards/arm/stp/stp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
CONFIG_ZMK_BLE=y
CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_BT_DIS_MANUF="Kinesis Corporation"
#CONFIG_BT_DIS_MANUF="Kinesis Corporation"
CONFIG_BT_DIS_PNP_VID=0x29EA
CONFIG_BT_DIS_PNP_PID=0x1000
CONFIG_BT_MAX_CONN=2
Expand All @@ -72,10 +72,13 @@ CONFIG_BT_MAX_PAIRED=2
CONFIG_ZMK_USB=y
CONFIG_USB_DEVICE_VID=0x29EA
CONFIG_USB_DEVICE_PID=0x1000
CONFIG_USB_DEVICE_MANUFACTURER="Kinesis Corporation"
#CONFIG_USB_DEVICE_MANUFACTURER="Kinesis Corporation"

# Misc configuration
CONFIG_ZMK_PROFILESWITCH=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_BUILD_OUTPUT_UF2=y

CONFIG_ZMK_USB_LOGGING=y
CONFIG_ZMK_KEYBOARD_NAME="Tester"
8 changes: 1 addition & 7 deletions app/include/zmk/mouse/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ static const uint8_t zmk_mouse_hid_report_desc[] = {
HID_REPORT_SIZE(0x10),
HID_REPORT_COUNT(0x03),
HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL),
HID_USAGE_PAGE(HID_USAGE_CONSUMER),
HID_USAGE16(HID_USAGE_CONSUMER_AC_PAN),
HID_LOGICAL_MIN16(0xFF, -0x7F),
HID_LOGICAL_MAX16(0xFF, 0x7F),
HID_REPORT_COUNT(0x01),
HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL),
HID_END_COLLECTION,
HID_END_COLLECTION,
#endif // IS_ENABLED(CONFIG_ZMK_MOUSE)
Expand Down Expand Up @@ -249,7 +243,7 @@ struct zmk_hid_mouse_report_body {
int16_t d_x;
int16_t d_y;
int16_t d_scroll_y;
int16_t d_scroll_x;
// int16_t d_scroll_x;
} __packed;

struct zmk_hid_mouse_report {
Expand Down
8 changes: 4 additions & 4 deletions app/src/mouse/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ void zmk_hid_mouse_movement_update(int16_t x, int16_t y) {
}

void zmk_hid_mouse_scroll_set(int8_t x, int8_t y) {
mouse_report.body.d_scroll_x = x;
// mouse_report.body.d_scroll_x = x;
mouse_report.body.d_scroll_y = y;
LOG_DBG("Mouse scroll set to %d/%d", mouse_report.body.d_scroll_x,
LOG_DBG("Mouse scroll set to %d/%d", mouse_report.body.d_scroll_y,
mouse_report.body.d_scroll_y);
}

void zmk_hid_mouse_scroll_update(int8_t x, int8_t y) {
mouse_report.body.d_scroll_x += x;
// mouse_report.body.d_scroll_x += x;
mouse_report.body.d_scroll_y += y;
LOG_DBG("Mouse scroll updated to X: %d/%d", mouse_report.body.d_scroll_x,
LOG_DBG("Mouse scroll updated to X: %d/%d", mouse_report.body.d_scroll_y,
mouse_report.body.d_scroll_y);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/stp_indicators.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,4 +443,4 @@ ZMK_SUBSCRIPTION(stp_indicators, zmk_usb_conn_state_changed);
ZMK_SUBSCRIPTION(stp_indicators, zmk_ble_active_profile_changed);
ZMK_SUBSCRIPTION(stp_indicators, zmk_hid_indicators_changed);

SYS_INIT(zmk_stp_indicators_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
SYS_INIT(zmk_stp_indicators_init, POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY);

0 comments on commit 3941746

Please sign in to comment.