I've remapped some mouse keys to help me navigate in firefox, later I'll extend the use to other applications.
In particular, I remapped button 4 of the mouse so that the active web page scrolls up at the beginning, i.e. what happens by pressing the 'Home' key on the keyboard.
The problem is that now if I press button 4 on my keyboard the same thing happens as if I press button 4 on my mouse, ie it's like pressing 'Home.'
This doesn't happen with the numeric keypad.
For example, if I'm in a text box and I want to type the number '4' to write '44 cats in a row with the remainder of 2', as soon as I press 4, the cursor returns to the beginning of the line.
I don't understand why, mouse button 4 is the same character 4 of the keyboard, and xev confirms it for me:
mouse key 4 button:
KeyPress event, serial 49, synthetic NO, window 0x4200001,
root 0x78a, subw 0x0, time 2402842, (93,102), root:(964,583),
state 0x10, keycode 13 (keysym 0x34, 4), same_screen YES,
XLookupString gives 1 bytes: (34) "4"
XmbLookupString gives 1 bytes: (34) "4"
XFilterEvent returns: False
keyboard key 4 button:
KeyRelease event, serial 40, synthetic NO, window 0x3200001,
root 0x78a, subw 0x0, time 11553777, (170,-9), root:(1041,472),
state 0x10, keycode 13 (keysym 0x34, 4), same_screen YES,
XLookupString gives 1 bytes: (34) "4"
XFilterEvent returns: False
Below is the xbindkeys configuration code and the script to scrool up the page to the top:
;; mouse #4
(xbindkey '("c:13") "/home/andrea/programmazione/bash-scripts/script-mouse-binding-scroll-up.sh")
;; mouse #7
(xbindkey '("c:16") "/home/andrea/programmazione/bash-scripts/script-mouse-binding-scroll-down.sh")
;; mouse #6
(xbindkey '("c:15") "/home/andrea/programmazione/bash-scripts/script-mouse-key6-binding.sh")
Basically all additional mouse keys 4, 5, 6, 7, 8, 9 are assigned to their respective numbers.
So now my question is intuitive, how do I avoid this behavior?
I thought about changing the mouse button mapping from source, i.e. not assigning it the character '4', but I don't know where to start.
Thank you
