Mouse keys

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Mouse keys is a feature of some graphical user interfaces that uses the keyboard (especially numeric keypad) as a pointing device (usually replacing a mouse). 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.[1][2]

Layout

File:X window system MouseKeys default numpad layout.svg
X window system MouseKeys default numpad layout
key action
Script error: No such module "key". with Script error: No such module "key".

enable/disable MouseKeys

Script error: No such module "key". cursor up
Script error: No such module "key". cursor down
Script error: No such module "key". cursor right
Script error: No such module "key". cursor left
Script error: No such module "key". cursor up and left
Script error: No such module "key". cursor up and right
Script error: No such module "key". cursor down and right
Script error: No such module "key". cursor down and left
Script error: No such module "key". select primary button
Script error: No such module "key". select modifier button
Script error: No such module "key". select alternate button
Script error: No such module "key". click selected button
Script error: No such module "key". double click selected button
Script error: No such module "key". depress selected button
Script error: No such module "key". release selected button
Script error: No such module "key". enter 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:

  • precision requirements (e.g., technical drawing)
  • disabled user or ergonomics issues
  • environmental limits (e.g., vibration in car or plane)
  • broken/missing/unavailable equipment

In 1987, Macintosh Operating System 4.2 Easy Access provided MouseKeys support to all applications. Easy access was (de)activated by clicking the Script error: No such module "key". key five times.Script error: No such module "Unsubst".

By the early 2020s, with graphics tablets becoming more common, a configuration change may be required before enabling MouseKeys.Script error: No such module "Unsubst".

MouseKeysAccel

File:X Protocol MouseKeysAccel Control Trajectory.svg
X window system MouseKeysAccel trajectory
parameter meaning
mk_delay milliseconds between the initial key press and first repeated motion event
mk_interval milliseconds between repeated motion events
mk_max_speed steady speed (in action_delta units) applied each event
mk_time_to_max number of events (count) accelerating to steady speed
mk_curve ramp used to reach maximum pointer speed

The X Window System MouseKeysAccel control applies action (usually cursor movement) repeatedly while a direction key {1,2,3,4,6,7,8,9} remains depressed.[3] 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.

action_delta×mk_max_speed×(imk_time_to_max)1000+mk_curve1000

mk_curve result
-1000 uniform speed, linearly increasing action
0 uniform acceleration, linearly increasing speed
1000 uniform jerk, linearly increasing acceleration

These five parameters are configurable.[4]

Enabling

Under the X Window Systems X.Org and XFree86 used on Unix-like systems such as Linux, BSD, and AIX, MouseKeys (and MouseKeysAccel), when available, is nominally (de)activated by Script error: No such module "key".+Script error: No such module "key".+Script error: No such module "key"..[5] MouseKeys without acceleration (also known as plot mode) is sometimes available with Script error: No such module "key".+Script error: No such module "key".. This is nominally independent of the window manager in use, but may be overridden, or even made unavailable by a configuration file.

Before enabling, it may be necessary to change system configuration. The setxkbmap utility can be used to change the configuration under Xorg:[6]

setxkbmap -option keypad:pointerkeys

There are also various utilities to allow more precise control via user-configurable key bindings, such as xmousekeys and xdotool.

Since KDE 5, MouseKeys is enabled and configured by systemsetting5[7] (Hardware → Input Devices → Mouse → Keyboard Navigation)

MouseKeys for Apple Inc.'s macOS is enabled and configured via the Accessibility[8] ([apple] → System Preferences → Accessibility → Mouse & Trackpad).

Microsoft changed the method of enabling between Windows 2000,[9] Windows XP (added diagonal cursor movement and MouseKeysAccel),[10] and Windows Vista.[11]

Common usage

Replacing the mouse keys

Replacing the mouse keys by the numeric keypad is as follows:

Typing Script error: No such module "key". (with the numeric keypad) is equivalent to clicking the selected button. By default, the selected button is the primary button (nominally under index finger, left button for most right-handed people and right button for most left-handed people). Typing Script error: No such module "key". (with the numeric keypad) selects the alternate button (nominally under ring finger, right button for most right-handed people and left button for most left-handed people). Typing Script error: No such module "key". (with the numeric keypad) selects the modifier button (nominally under the middle finger, middle button of a 3-button mouse). Typing Script error: No such module "key". (with the numeric keypad) 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 Script error: No such module "key"., all other numeric keys from the numeric keypad are used to move the pointer on the screen. For example, Script error: No such module "key". will move the pointer upwards, while Script error: No such module "key". will move it diagonally downwards to the left.

See also

References

<templatestyles src="Reflist/styles.css" />

  1. The X Keyboard Extension: Protocol Specification
  2. The X Keyboard Extension: Library Specification
  3. The X Keyboard Extension: Library Specification, Library Version 1.0/Document Revision 1.1, X Consortium Standard, X Version 11 / Release 6.4, Keyboard Controls, 10.5.2, The MouseKeysAccel Control
  4. GNOME Documentation Library, Configuring a Keyboard-Based Mouse Template:Webarchive
  5. The X Keyboard Extension: Library Specification, Library Version 1.0/Document Revision 1.1, X Consortium Standard, X Version 11 / Release 6.4, Keyboard Controls, 10.5.1, The MouseKeys Control
  6. Script error: No such module "citation/CS1".
  7. KDE.org, Using System Settings, System Settings Categories and Modules
  8. Apple.com, Mac OS X, Accessibility
  9. Microsoft.com, Accessibility Tutorials, Windows 2000, Turning MouseKeys On and Off
  10. Microsoft.com, Accessibility Tutorials, Windows XP, MouseKeys: Control the Mouse Pointer Using the Numeric Keypad
  11. Microsoft.com, Accessibility Tutorials, Windows Vista, Control the mouse pointer with the keyboard (Mouse Keys)

Script error: No such module "Check for unknown parameters".