Linux Move Cursor With Keyboard
2020, Jun 21
Linux just makes everything so easy. On a laptop it can be tricky to place your mouse cursor on exactly the correct pixel, using the touchpad. This became apparent to myself while using GIMP to create some png button files for a little tkinter project, but there must be other use-cases as well.
- move the cursor one pixel left:
xdotool mousemove_relative -- -1 0
- move the cursor one pixel right:
xdotool mousemove_relative -- 1 0
- move the cursor one pixel up:
xdotool mousemove_relative -- 0 -1
- move the cursor one pixel down:
xdotool mousemove_relative -- 0 1
Now, in your keyboard settings, map the above commands to new custom shortcuts.
For instance, I find
Ctrl+Super+<arrow>keys to be convenient in the Mate Desktop. Enjoy!