I know that there are many questions on the internet about setting keyboard/mouse multimedia keys/buttons in Linux, nevertheless my question is more specific.My wireless input devices:Logitech K270 keyboard,Logitech M510 mouse.The above-mentioned keyboard has i.a.:volume up,volume downkeys which work fine. My mouse has few multimedia buttons which don't have assigned any actions. I want to assign to two mouse buttons, the same actions, which are assigned to the volume up/down keyboard keys.Important note:When I hold the volume up/down keyboard key down, the volume is  gradually getting louder/quieter until volume is maximum/muted. I want  the same effect with my mouse.To fulfill above requirements I followed following steps:I installed xvkbd, which is virtual keyboard for X window system,I checked with xev what are the codes of mouse's buttons (8 - volume down, 9 - volume up),I added following lines to ~/.xbindkeysrc:xvkbd -text '\[XF86AudioLowerVolume]'  b:8xvkbd -text '\[XF86AudioRaiseVolume]'  b:9I brutally 'reloaded' xbindkeys daemon (actually I don't know if it can be called daemon because it starts from /etc/xdg/autostart):pkill -f xbindkeys && xbindkeysBTW: I don't know how to reload it gracefully.and it almost works. Now I can turn the volume up/down with mouse buttons but if I keep holding volume up/down button, the volume is not getting gradually louder/quieter. It stops after one 'iteration'. I want 'auto-repeat' as long as I'm holding the button down.Questions:How can I fix it?Is there any other way I can do it? For instance using only xmodmap, instead xvkbd + xbindkeys?For the sake of completeness:xmodmap result:abc@xyz:~$ xmodmap -pke | grep -i volumekeycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolumekeycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolumeRelated commands: xmodmap, xev, showkeys, xbindkeys, xvkbd.Nice ArchWiki webpage about extra keyboard keys.All keysyms are defined in following header files: /usr/include/X11/keysymdef.h and here /usr/include/X11/XF86keysym.h.
Adjust volume using mouse multimedia buttons
audio;keyboard shortcuts;mouse;multimedia;xbindkeys