hardware.trackpoint.emulateWheel behaviour for mouse

Is there anyway to have the same emulation for mouse.
when holding the middle button, mouse movement x and y goes to scroll instead.

my mouse currently is suffering greatly to scroll jumping making it impossible to be used for anything.

any alternatives are also welcome.

1 Like

There are several programs that can do this. I recommend looking at the ones that use libinput, because those work with both X11 and Wayland - e.g. keymapper and kmonad (actually not certain about kmonad).

1 Like

thanks i will check those out

I decided to use xremap
my idea is to bind the middle mouse button so that when its held, the mouse movement x and y becomes scroll horizontal and vertical, its basically a drag like behavior.

for reference some important keys i found out:

BTN_MIDDLE: is the middle mouse button
REL_{X/Y}: is the {Horizontal/vertical} scroll

searching a bit i figured out three hypothesis how to do this (all to which i couldnt accomplish)

firstly

would be to set a custom modifier to which middle mouse button will set when held and unset when released, the modifier would make so that mouse move would map to scroll behaviour this is what i tried for this one:

keymap:
- name: Middle mouse drag
  remap:
    MOUSE_DRAG-REL_Y: REL_WHELL
    MOUSE_DRAG-REL_x: REL_HWHELL
modmap:
- name: 'Middle mouse drag: setting modifier'
  remap:
    BTN_MIDDLE:
      alone_timeout_millis: 150
      held:
        set_modifier: MOUSE_DRAG
      release:
        unset_modifier: MOUSE_DRAG
virtual_modifiers:
- MOUSE_DRAG

second

would be to instead of creating a new modifier use “KEY_RIGHTALT” instead
third
would be to use mouse middle as the modifier itself, but without loosing the middle-mouse click behaviour
for the third i tried this:

keymap:
- name: Middle mouse drag
  remap:
    BTN_MIDDLE-REL_Y: REL_WHELL
    BTN_MIDDLE-REL_x: REL_HWHELL
modmap: []
virtual_modifiers:
- BTN_MIDDLE

errors

for now the main error is the following

keymap[0].remap: unknown key 'REL_Y' at line 4 column 5

clearly its not understanding REL_Y to which should be mouse movement, yet its the event to which appears when using evtest what should i do instead?