You are not logged in.
Hello
I'm attempting to remap my mouse's back button (logitech M650 L) to function as the Left Shift key on my Arch Linux system running KDE. Despite exploring various tools and configurations, I haven't been able to achieve the desired functionality.
System Details:
Distribution: Arch Linux
Desktop Environment: KDE Plasma
Mouse: Logitech USB Receiver Mouse ( logitech M650 L)
Tools and Methods Attempted:
1. xremap:
Issue: Encountered configuration errors related to the device field, preventing successful remapping.
2. xbindkeys with xvkbd/xautomatio:
Issue: only registers single click not hold and xautomation makes keybourd stop working
3. kde build in feature
issue: same as xbindkeys
4. keyd
issue : same as xbindkeys
5. input-remapper
issue: same as xbindkeys
6. solaar
issue: same as xbindkeys
Last edited by gaming (2025-03-31 01:32:59)
Offline
https://wiki.archlinux.org/title/Input_remap_utilities
Also
xbindkeys with xvkbd/xautomatio:
detail what you actually tried, b/c you'd have to specifically map button and button + Release to eg. xdotool keydown/keyup actions
Offline
Here is my xbindkeys i used gui application of xbindkeys_config-gtk
###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.4
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...
#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable
# Pressing the back button down
"xte 'keydown Shift_L'"
m:0x0 + b:8 (mouse)
"wU
#
# End of xbindkeys configurationalso i tried evremap here is its config
[Unit]
Description=evremap service
After=multi-user.target
[Service]
ExecStart=/usr/local/bin/evremap -c /home/your_username/.config/evremap/config.toml
Restart=always
User=root
[Install]
WantedBy=multi-user.targetif need any other please tell i really need to get this off to complete my switch to linux completely
Last edited by gaming (2025-04-02 05:49:24)
Offline
That's a systemd service to start evremap, but not the evremap config.
And if you didn't replace what looks like a placeholder in "/home/your_username/.config/evremap/config.toml", that will fail, too.
Also
# Pressing the back button down
"xte 'keydown Shift_L'"
m:0x0 + b:8 (mouse)
"wU
# doesn't look like valid xbindkeys syntax, there's what looks like a stray ""wU" and I also doubt that you can add the "(mouse)" comment (?) there, so I assume xbindkeys refuses to start with an error?
And, as mentioned, you'll need a second entry for the release.
Offline
sorry you are correct i had saved the config in a seperate file been submiting it into github issues here is the correct file ~/.config/evremap/config.toml
[[device]]
name = "Logitech USB Receiver Mouse" # Replace with your mouse's exact device name
[device.remap]
BTN_SIDE = ["KEY_LEFTSHIFT"]and i use this gtk for xkeybinds https://github.com/rgeorgiev583/xbindkeys_config
the previous file ~/.xbindkeysrc is edited using above gtk tool
Last edited by gaming (2025-04-02 15:39:10)
Offline
That isn't a valid evremap config, https://github.com/wez/evremap/blob/mas … remap.toml
And whatever tool you used to edit the xbindkeys config is less important than what it looks like.
And you've not addressed whether either daemon actually starts up, notably w/ the bogus path in the evremap service.
This is going nowhere.
I assume you don't speak english?
https://deepl.com/ does.
Offline
i have done some changes to evremap config also i am using this command
sudo evremap remap .config/evremap/evremap.tomlto test the remap i have not yet copied the config to /etc/evremap.toml which the systemd service use
here is the new config but it is still not able to produce any result heck even the single click does not work
device_name = "Logitech USB Receiver Mouse" # Replace with your mouse's exact device name
phys = "usb-0000:00:14.0-2/input1"
[device.remap]
input = ["BTN_THUMB2"]
output = ["KEY_LEFTSHIFT"]Last edited by gaming (2025-04-03 16:12:21)
Offline
Which
a) does still not look like the example pattern and
b) "replace with…" gives me some pause - is that actually the relevant device?
lsusb -tv
sudo evtest # will print the device names, edit: and also the proper event for the button, sure it's BTN_THUMB2?Last edited by seth (2025-04-04 07:59:05)
Offline
the output of lsusb -tv is below
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/12p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 002: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c548 Logitech, Inc. Logi Bolt Receiver
|__ Port 002: Dev 002, If 1, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c548 Logitech, Inc. Logi Bolt Receiver
|__ Port 002: Dev 002, If 2, Class=Human Interface Device, Driver=usbhid, 12M
ID 046d:c548 Logitech, Inc. Logi Bolt Receiver
|__ Port 003: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 480M
ID 0781:557d SanDisk Corp. Cruzer Force
|__ Port 006: Dev 004, If 0, Class=Video, Driver=uvcvideo, 480M
ID 0c45:6d1a Microdia
|__ Port 006: Dev 004, If 1, Class=Video, Driver=uvcvideo, 480M
ID 0c45:6d1a Microdia
|__ Port 010: Dev 005, If 0, Class=Wireless, Driver=btusb, 12M
ID 0bda:c829 Realtek Semiconductor Corp.
|__ Port 010: Dev 005, If 1, Class=Wireless, Driver=btusb, 12M
ID 0bda:c829 Realtek Semiconductor Corp.
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
ID 1d6b:0003 Linux Foundation 3.0 root hubi have updated the config according to evtest command output
sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Power Button
/dev/input/event10: PC Speaker
/dev/input/event11: Dell Privacy Driver
/dev/input/event12: Dell WMI hotkeys
/dev/input/event13: DELL0AB0:00 04F3:3147 Mouse
/dev/input/event14: DELL0AB0:00 04F3:3147 Touchpad
/dev/input/event15: PS/2 Generic Mouse
/dev/input/event16: HDA Intel PCH Headphone Mic
/dev/input/event17: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event18: HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event19: HDA Intel PCH HDMI/DP,pcm=8
/dev/input/event2: AT Translated Set 2 keyboard
/dev/input/event20: HDA Intel PCH HDMI/DP,pcm=9
/dev/input/event3: Video Bus
/dev/input/event4: Logitech USB Receiver
/dev/input/event5: Logitech USB Receiver Mouse
/dev/input/event6: Logitech USB Receiver Consumer Control
/dev/input/event7: Logitech USB Receiver System Control
/dev/input/event8: Intel HID events
/dev/input/event9: Intel HID 5 button array
Select the device event number [0-20]: 5
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x46d product 0xc548 version 0x111
Input device name: "Logitech USB Receiver Mouse"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 274 (BTN_MIDDLE)
Event code 275 (BTN_SIDE)
Event code 276 (BTN_EXTRA)
Event code 277 (BTN_FORWARD)
Event code 278 (BTN_BACK)
Event code 279 (BTN_TASK)
Event code 280 (?)
Event code 281 (?)
Event code 282 (?)
Event code 283 (?)
Event code 284 (?)
Event code 285 (?)
Event code 286 (?)
Event code 287 (?)
Event type 2 (EV_REL)
Event code 0 (REL_X)
Event code 1 (REL_Y)
Event code 6 (REL_HWHEEL)
Event code 8 (REL_WHEEL)
Event code 11 (REL_WHEEL_HI_RES)
Event code 12 (REL_HWHEEL_HI_RES)
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1743830972.776035, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1743830972.776035, type 1 (EV_KEY), code 275 (BTN_SIDE), value 1
Event: time 1743830972.776035, -------------- SYN_REPORT ------------
Event: time 1743830972.782908, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90004
Event: time 1743830972.782908, type 1 (EV_KEY), code 275 (BTN_SIDE), value 0
Event: time 1743830972.782908, -------------- SYN_REPORT ------------.config/evremap/evremap.toml
device_name = "Logitech USB Receiver Mouse" # Replace with your mouse's exact device name
phys = "usb-0000:00:14.0-2/input1"
[[remap]]
input = ["BTN_SIDE"]
output = ["KEY_LEFTSHIFT"]but still does not work i am doing the test in this website https://en.key-test.ru/
Last edited by gaming (2025-04-05 05:30:54)
Offline
Remove the "phys" line, make sure evremap is actually running and doesn't fail w/ some error and test the input w/ "libinput debug-events"
Offline
Thank you the click work but the old problem when i hold the button it does not regester any input what to do here is the new config
i have moved it to /etc/evremap.toml
device_name = "Logitech USB Receiver Mouse" # Replace with your mouse's exact device name
[[remap]]
input = ["BTN_SIDE"]
output = ["KEY_LEFTSHIFT"]Offline
make sure evremap is actually running and doesn't fail w/ some error
ps aux | grep evremOnly if evremap is actually running
when i hold the button it does not regester any input
Run "sudo libinput debug-events" and press the mouse button, does that register as KEYBOARD_KEY press/release?
Offline
here are the output of ps aux | grep evrem
root 636 0.0 0.0 5556 3560 ? Ss 16:52 0:00 /usr/bin/evremap remap /etc/evremap.toml -d 0
akkhil 39076 0.0 0.0 7280 4784 pts/0 S+ 17:02 0:00 \_ rg evremhere isthe output when i run command sudo libinput debug-events and press then hold the button
-event4 DEVICE_ADDED Video Bus seat0 default group1 cap:k
-event1 DEVICE_ADDED Power Button seat0 default group2 cap:k
-event0 DEVICE_ADDED Lid Switch seat0 default group3 cap:S
-event3 DEVICE_ADDED Logitech USB Receiver seat0 default group4 cap:k
-event5 DEVICE_ADDED Logitech USB Receiver Mouse seat0 default group4 cap:p left scroll-nat scroll-button
-event6 DEVICE_ADDED Logitech USB Receiver Consumer Control seat0 default group4 cap:kp scroll-nat
-event7 DEVICE_ADDED Logitech USB Receiver System Control seat0 default group4 cap:k
-event11 DEVICE_ADDED DELL0AB0:00 04F3:3147 Mouse seat0 default group5 cap:p left scroll-nat scroll-button
-event12 DEVICE_ADDED DELL0AB0:00 04F3:3147 Touchpad seat0 default group5 cap:pg size 113x79mm tap (dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwtp-on
-event9 DEVICE_ADDED Intel HID 5 button array seat0 default group6 cap:k
-event8 DEVICE_ADDED Intel HID events seat0 default group7 cap:k
-event13 DEVICE_ADDED Dell Privacy Driver seat0 default group8 cap:k
-event14 DEVICE_ADDED Dell WMI hotkeys seat0 default group9 cap:k
-event2 DEVICE_ADDED AT Translated Set 2 keyboard seat0 default group10 cap:k
-event15 DEVICE_ADDED PS/2 Generic Mouse seat0 default group11 cap:p left scroll-nat scroll-button
-event21 DEVICE_ADDED evremap Virtual input for /dev/input/event5 seat0 default group12 cap:kp left scroll-nat scroll-button
event21 KEYBOARD_KEY +1.058s *** (-1) pressed ------ #this is a test click
event21 KEYBOARD_KEY +1.081s *** (-1) released ------ #this is a test click
event21 KEYBOARD_KEY +8.701s *** (-1) pressed
event21 KEYBOARD_KEY +8.709s *** (-1) released
-event2 KEYBOARD_KEY +10.459s *** (-1) pressedNote when i first hold the button it does not show any output and after second hold it shows the above output
Last edited by gaming (2025-04-07 13:59:38)
Offline
evremap fires a key twice, each time it's down only 23 ms resp. 8 ms so either your mouse or evremap bounces.
Do you have more luck w/ "[[dual_role]]" and "hold ="?
Offline
yeah i tried those it registers as 2 seperate clicks together not a click when click and hold when hold here is the config
# Configuration file for evremap
device_name = "Logitech USB Receiver Mouse" # Replace with your mouse's exact device name
[[dual_role]]
input = "BTN_SIDE"
hold = ["KEY_LEFTSHIFT"]
tap = ["KEY_LEFTSHIFT"]Offline
Don't configure the tap as left shift?
Btw, the tool of choice seems to be keyd, have you actually tried that?
See eg. https://github.com/rvaiya/keyd/issues/922
Offline
Not sure if it's supported but you could give piper a try https://github.com/libratbag/piper
Has arch package.
Offline
piper backend libratbag does not support logitech M650 series i check it in issues as for keyd i cannot figureout what is my back button or i am having issue : same as xbindkeys the hold does not work and my keyboard gets blocked (laptop intigrated keyboard) here is my keyd config
[ids]
*
[main]
# Maps Mouse Back to Left Shift when pressed and control when held.
mouse1 = leftshift here is the output of sudo keyd monitor
device added: 0fac:1ade:d2b36ae6 keyd virtual pointer (/dev/input/event22)
device added: 0fac:0ade:efba1ddf keyd virtual keyboard (/dev/input/event21)
device added: 0002:0001:e8603d8f PS/2 Generic Mouse (/dev/input/event15)
device added: 04f3:3147:e1ae11df DELL0AB0:00 04F3:3147 Touchpad (/dev/input/event14)
device added: 04f3:3147:9632d291 DELL0AB0:00 04F3:3147 Mouse (/dev/input/event13)
device added: 0000:0000:6092cb44 Dell WMI hotkeys (/dev/input/event12)
device added: 0000:0000:52563095 Intel HID events (/dev/input/event8)
device added: 046d:c548:9389c4c7 Logitech USB Receiver Consumer Control (/dev/input/event6)
device added: 046d:c548:457868e9 Logitech USB Receiver Mouse (/dev/input/event5)
device added: 046d:c548:ee80da6c Logitech USB Receiver (/dev/input/event4)
device added: 0000:0006:bdb72f48 Video Bus (/dev/input/event3)
device added: 0001:0001:a31694d4 AT Translated Set 2 keyboard (/dev/input/event2)
keyd virtual keyboard 0fac:0ade:efba1ddf enter up
Logitech USB Receiver Mouse 046d:c548:457868e9 mouse1 down
Logitech USB Receiver Mouse 046d:c548:457868e9 mouse1 upLast edited by gaming (2025-04-12 04:42:02)
Offline
Please someone help above are my keyd maps
Offline
Disable any mapper, run "sudo linput debug-events", press the desired mouse button. Hold it for ~30 seconds. Then release it. Post the libinput output.
Then enable your keyd setting, boot into an X1 session and run "xev -event keyboard -event mouse", try to enter "A" using the mouse as shift. Post that output, too.
(in case: "… |& tee output_copy.txt")
Offline
no output for my side button in 1st attempt
sudo libinput debug-events
-event8 DEVICE_ADDED Video Bus seat0 default group1 cap:k
-event1 DEVICE_ADDED Power Button seat0 default group2 cap:k
-event0 DEVICE_ADDED Lid Switch seat0 default group3 cap:S
-event3 DEVICE_ADDED Logitech USB Receiver seat0 default group4 cap:k
-event4 DEVICE_ADDED Logitech USB Receiver Mouse seat0 default group4 cap:p left scroll-nat scroll-button
-event5 DEVICE_ADDED Logitech USB Receiver Consumer Control seat0 default group4 cap:kp scroll-nat
-event6 DEVICE_ADDED Logitech USB Receiver System Control seat0 default group4 cap:k
-event12 DEVICE_ADDED DELL0AB0:00 04F3:3147 Mouse seat0 default group5 cap:p left scroll-nat scroll-button
-event13 DEVICE_ADDED DELL0AB0:00 04F3:3147 Touchpad seat0 default group5 cap:pg size 113x79mm tap (dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwtp-on
-event9 DEVICE_ADDED Intel HID events seat0 default group6 cap:k
-event10 DEVICE_ADDED Intel HID 5 button array seat0 default group7 cap:k
-event14 DEVICE_ADDED Dell Privacy Driver seat0 default group8 cap:k
-event15 DEVICE_ADDED Dell WMI hotkeys seat0 default group9 cap:k
-event2 DEVICE_ADDED AT Translated Set 2 keyboard seat0 default group10 cap:k
-event7 DEVICE_ADDED PS/2 Generic Mouse seat0 default group11 cap:p left scroll-nat scroll-buttonin second attempt i clicked the mouse side button it got registered
sudo libinput debug-events
-event8 DEVICE_ADDED Video Bus seat0 default group1 cap:k
-event1 DEVICE_ADDED Power Button seat0 default group2 cap:k
-event0 DEVICE_ADDED Lid Switch seat0 default group3 cap:S
-event3 DEVICE_ADDED Logitech USB Receiver seat0 default group4 cap:k
-event4 DEVICE_ADDED Logitech USB Receiver Mouse seat0 default group4 cap:p left scroll-nat scroll-button
-event5 DEVICE_ADDED Logitech USB Receiver Consumer Control seat0 default group4 cap:kp scroll-nat
-event6 DEVICE_ADDED Logitech USB Receiver System Control seat0 default group4 cap:k
-event12 DEVICE_ADDED DELL0AB0:00 04F3:3147 Mouse seat0 default group5 cap:p left scroll-nat scroll-button
-event13 DEVICE_ADDED DELL0AB0:00 04F3:3147 Touchpad seat0 default group5 cap:pg size 113x79mm tap (dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwtp-on
-event9 DEVICE_ADDED Intel HID events seat0 default group6 cap:k
-event10 DEVICE_ADDED Intel HID 5 button array seat0 default group7 cap:k
-event14 DEVICE_ADDED Dell Privacy Driver seat0 default group8 cap:k
-event15 DEVICE_ADDED Dell WMI hotkeys seat0 default group9 cap:k
-event2 DEVICE_ADDED AT Translated Set 2 keyboard seat0 default group10 cap:k
-event7 DEVICE_ADDED PS/2 Generic Mouse seat0 default group11 cap:p left scroll-nat scroll-button
-event4 POINTER_BUTTON +0.000s BTN_SIDE (275) pressed, seat count: 1
event4 POINTER_BUTTON +0.022s BTN_SIDE (275) released, seat count: 0i think the mouse desined to not show hold in presence of linux logitech devil, I checked it in windows too if i uninstall logi option + the mouse cannot regiter hold , is there a way to fix that
Last edited by gaming (2025-06-01 03:48:22)
Offline
i think the mouse desined to not show hold … checked it in windows too if i uninstall logi option + the mouse cannot register hold
in second attempt i clicked the mouse side button it got registered
What changed between those attempts? Do the click register erratically tbw?
It could be that the button switch is bogus and either doesn't fire at all or bounces?
in presence of linux logitech devil
In presence of what?
Offline
I found the problem it's horizontal scrolling if i disable it through logi + software the problem goes away just need to know how to implement same thing in linux
(in presence of linux logitech devil)
oh this was just a phrase meaning logitech is the devil and don't want to worship the peigwin god
Offline
Is it covered by https://archlinux.org/packages/extra/any/solaar/ ?
Offline
no this option is not available in solaar as stated in this issue on github
https://github.com/pwr-Solaar/Solaar/issues/2888
Last edited by gaming (2025-07-09 15:58:02)
Offline