I know how to map mouse click for F1, F2 and F3 (respectively left click, middle click, right click):
xkbset m # required, but disable keypad xmodmap -e "keycode 67 = Pointer_Button1 Pointer_Button1" xmodmap -e "keycode 68 = Pointer_Button2" xmodmap -e "keycode 69 = Pointer_Button3"
But this requires me to use
xkbset m that use the slow keys mode :
If I press 4 from the keypad, it moves the cursor to the left. I don't need this feature, just the mapping above.
I tried to figure it out with
xdotool, but I don't know how to handle key pressed/key released (for drag & drop) with
xdotool mousedown 1 xdotool mouseup 1
How can I not use this mode or how can I remap all keypad keys ?
What about the numeric and arithmetic signs from keypad please ?
Is there another solution ?
For information, needed for Debian (cinnamon) and Archlinux (xfce), and if possible, I would like a solution not based on the window manager.
Tried this solution but I can't drag and drop with F1.
"xdotool mousedown 1" F1 "xdotool mouseup 1" F1 + Release
"xdotool mousedown 1" m:0x10 + c:67 "xdotool mouseup 1" m:0x10 + c:67 + Release
xset -r 67
Tried with actkbd
# actkbd configuration file <keycode ("67")> :key : :xdotool mousedown 1 <keycode ("67")> :rel : :xdotool mouseup 1
No cigar :/
Adapted from here