Mouse keys


Mouse keys is a feature of some graphical user interfaces that uses the keyboard
as a pointing device. Its roots lie in the earliest days of visual editors when line and column navigation was controlled with arrow keys.
Today, mouse keys usually refers to the numeric keypad layout standardized with the introduction of the X Window System in 1984.

Layout

keyaction
Num LockWith Alt-Shift
Enable/Disable MouseKeys
8cursor up
2cursor down
6cursor right
4cursor left
7cursor up and left
9cursor up and right
3cursor down and right
1cursor down and left
/select primary button
*select modifier button
-select alternate button
5click selected button
+double click selected button
0depress selected button
.release selected button
EnterEnter Key

History

Historically, MouseKeys supported GUI programs when many terminals had no dedicated pointing device. As pointing devices became ubiquitous, the use of mouse keys narrowed to situations where a pointing device was missing, unusable, or inconvenient. Such situations may arise from the following:
parametermeaning
mk_delaymilliseconds between the initial key press and first repeated motion event
mk_intervalmilliseconds between repeated motion events
mk_max_speedsteady speed applied each event
mk_time_to_maxnumber of events accelerating to steady speed
mk_curveramp used to reach maximum pointer speed

The X Window System MouseKeysAccel control applies action repeatedly while a direction key
remains depressed. When the key is depressed, an action_delta is immediately applied. If the key remains depressed, longer than mk_delay milliseconds, some action is applied every mk_interval milliseconds until the key is released. If the key remains depressed, after more than mk_time_to_max actions have been applied, action_delta magnified mk_max_speed times, is applied every mk_interval milliseconds.
The first mk_time_to_max actions increase smoothly according to an exponential.
mk_curveresult
-1000uniform speed, linearly increasing action
0uniform acceleration, linearly increasing speed
1000uniform jerk, linearly increasing acceleration

These five parameters are configurable.

Enabling

Under the X Window Systems Xorg and XFree86 used on Unix-like systems such as Linux, BSD, and AIX, MouseKeys is nominally activated by ++. MouseKeys without acceleration is sometimes available with Shift+NumLock. This is independent of the Window Manager in use and may be overridden by a configuration file. The setxkbmap utility can be used to temporary enable mouse keys under Xorg:
setxkbmap -option keypad:pointerkeys
There are also various utilities to allow more precise control via user-configurable key bindings, such as and .
MouseKeys for Apple Inc's Mac OS X is enabled and configured via the Accessibility.
Microsoft changed the method of enabling between Windows 2000, Windows XP, and Windows Vista.

Common usage

Replacing the mouse keys

Replacing the mouse keys by the numeric keypad is as follows:
Typing is equivalent to clicking the selected button. By default, the selected button is the primary button. Typing selects the alternate button. Typing selects the modifier button. Typing selects the primary button. The selection remains in effect until a different button is selected.
Assignment of left/middle/right button to primary/modifier/alternate, alternate/modifier/primary, or something else is settable by many means. Some mice have a switch, that swaps assignment of right and left keys. Many laptop bioses have a setting for mouse button assignment. Many window managers have a setting that permutes the assignment. Within the X Window System core protocol, permutation can be applied by xmodmap.

Moving the pointer by keys

Other than, all other numeric keys from the numeric keypad are used to move the pointer on the screen. For example, will move the pointer upwards, while will move it diagonally downwards to the left.