This enables controlling mouse cursor from keyboard numpad keys in linux
To add mouse functionality to numpad keys
add this line to ~/.xprofile or remaps script from ~/.local/bin/
setxkbmap -option keypad:pointerkeys &
and
this line to /etc/X11/xorg.conf.d/00-keyboard.conf
add Option "XkbOptions" "keypad:pointerkeys"
and
press Ctrl+Shift+Numlock to activate it.
and Use from numpad Here keybind
| Key | Movement |
|---|---|
| 8 | Straight Up |
| 2 | Straight Down |
| 4 | Left |
| 6 | Right |
| 7 | Left Up |
| 9 | Right Up |
| 1 | Left bottom |
| 3 | Right bottom |
| 5 | Right Click |
| Keys | Direction |
|---|---|
| 7 8 9 | Up Direction |
| 4 6 | Left and Right Keys |
| 1 2 3 | Down Direction |
Special Movement
| Key | Clicks |
|---|---|
| 5 | Left Click |
| + | Double click |
| 0 | press and hold for selected mouse button |
| . | to release the currently selected mouse button |
| Key | Movement |
|---|---|
| / | Left click |
| * | Middle click |
| - | Right click |
Reference: