HOWTO use the numeric keyboard keys as mouse in XOrg

From LinuxReviews
Jump to: navigation, search

XOrg comes with built-in mouse emulation using the keyboards numeric keypad. The trick is to use Shift+NumLock to toggle the use of the numeric pad as a keyboard mouse on and off after enabling it in your configuration.

[edit] HOWTO enable keyboard mouse keys

Mousekeys used to be a default standardfeature of X11 and Xorg but this is no longer the case for some reason. It must now be enabled by having a line with the XkbOptions value keypad:pointerkeys.

Fedora users can add this line to /etc/X11/xorg.conf.d/00-keyboard.conf :

       Option "XkbOptions" "keypad:pointerkeys"

It can also be activated within Xorg with the command

setxkbmap -option keypad:pointerkeys 

[edit] Controlling the keyboard "mouse"

Hold Shift and press Num-Lock. You may hear a short beep depending on computer and GNU/Linux flavor. You may actually have to hold Shift and Ctrl and press Num-Lock on some systems.

Laptops may require you to hold the FN key to use the numeric pad, which makes this tricky.

  • 7, 8 ,9 are the up directions
  • 4, 6 are left and right
  • 1, 2, 3 are the down directions
  • / selects the left mouse key (press it twice for a doubleclick; and thrice for a tripleclick)
  • * selects the middle mouse key
  • - selects the right mouse key
  • Press 5 or + do to the actual mouseclick
  • Press 0/Ins to press and hold the selected mouse key (e.g. for dragging something)
  • Press ./Del to release the currently selected mouse key.

First select the mouse key you want to (ab)use by pressing / for left mouse key, - for the right botton or * for the middle and then press 5 to do the actual click-

Example: I move the mouse where I want it and then I want to middle click, so i press the * key and 5 to click.

[edit] Without the mouse in browsers, etc

It is easy to navigate browsers without mouse or any sort. Just use the arrow keys, enter does what leftclick does, the menu key does what the right click does and ctrl+enter acts like the middle click.

Personal tools
hardware tests
Privacy policy
linux events


linux newz | random page | poetry | free blog