diff options
| author | Joshua Rogers <Joshua@Joshua.Hu> | 2025-03-07 17:53:35 +0000 |
|---|---|---|
| committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2025-03-07 17:53:35 +0000 |
| commit | 8b04f07eda12badee0617508c37a0d9506acad24 (patch) | |
| tree | 40ce7e55ecfa3665fc9f51a0352ae4291ac581ee /sys/dev/syscons | |
| parent | 02fb6b1162d94962acde5815aa7c315191c3ec03 (diff) | |
Diffstat (limited to 'sys/dev/syscons')
| -rw-r--r-- | sys/dev/syscons/sysmouse.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 0e38070d613c..05008c50b950 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -94,7 +94,15 @@ smdev_evdev_write(int x, int y, int z, int buttons) evdev_push_event(sysmouse_evdev, EV_REL, REL_X, x); evdev_push_event(sysmouse_evdev, EV_REL, REL_Y, y); switch (evdev_sysmouse_t_axis) { - case EVDEV_SYSMOUSE_T_AXIS_PSM: + case EVDEV_SYSMOUSE_T_AXIS_WSP: /* 3 */ + if (buttons & (1 << 5)) { + evdev_push_rel(sysmouse_evdev, REL_HWHEEL, z); + buttons &= ~(1 << 5); + } else { + evdev_push_rel(sysmouse_evdev, REL_WHEEL, -z); + } + break; + case EVDEV_SYSMOUSE_T_AXIS_PSM: /* 2 */ switch (z) { case 1: case -1: @@ -106,14 +114,14 @@ smdev_evdev_write(int x, int y, int z, int buttons) break; } break; - case EVDEV_SYSMOUSE_T_AXIS_UMS: + case EVDEV_SYSMOUSE_T_AXIS_UMS: /* 1 */ if (buttons & (1 << 6)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, 1); else if (buttons & (1 << 5)) evdev_push_rel(sysmouse_evdev, REL_HWHEEL, -1); buttons &= ~((1 << 5)|(1 << 6)); /* PASSTHROUGH */ - case EVDEV_SYSMOUSE_T_AXIS_NONE: + case EVDEV_SYSMOUSE_T_AXIS_NONE: /* 0 */ default: evdev_push_rel(sysmouse_evdev, REL_WHEEL, -z); } |
