Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to bind keyboard and mouse together? #949

Open
chopin1998 opened this issue Sep 3, 2024 · 2 comments
Open

how to bind keyboard and mouse together? #949

chopin1998 opened this issue Sep 3, 2024 · 2 comments

Comments

@chopin1998
Copy link

input-remapper-control --version
input-remapper 2.0.1 568f56c https://github.com/sezanzeb/input-remapper
python-evdev 1.6.1

image

i wanna add a input: mouse WHEEL while keyboard SHIFT holding, to speedup scroll, how can i do this?

thank you !

@ocouch
Copy link

ocouch commented Sep 4, 2024

On the right hand side, under output. Click the 'Target' drop down and change it from 'mouse' to 'keyboard + mouse'. Then assign the key and mouse button combination you're chasing.

@shawarden
Copy link

shawarden commented Oct 15, 2024

You can't record the needed Shift+WheelUp input event since they are coming from separate devices.

Will likely also want to retain the normal shift to function but you want the mouse wheel to be modified.

A macro on the keyboard...

set(shifted,1).
hold_keys(Shift_L).
set(shifted,0)

...will do normal shift stuff but will also set a background variable to 1 when shift is held.

Then on the mouse, wheels would be set to...

if_eq(
	$shifted,
	1,
	then=
		wheel(up,100),
	else=
		wheel(up,1)
)

...and...

if_eq(
	$shifted,
	1,
	then=
		wheel(down,100),
	else=
		wheel(down,1)
)

...respectively.

However not all applications seem to like scrolling with shift held, so preventing the shift from working normally WHILE scrolling is another issue.

Not even something like...

if_eq(
	$shifted,
	1,
	then=
		key_up(Shift_L).
		wheel(up,100).
		key_down(Shift_L),
	else=
		wheel(down,1)
)

...and...

if_eq(
	$shifted,
	1,
	then=
		key_up(Shift_L).
		wheel(down,100).
		key_down(Shift_L),
	else=
		wheel(down,1)
)

...seems to work for me in firefox. Either works fine in konsole though so your milage may vary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants