Mouse keys

Last updated

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]

Contents

Layout

X window system MouseKeys default numpad layout X window system MouseKeys default numpad layout.svg
X window system MouseKeys default numpad 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
5 click selected button
+ double click selected button
0 depress selected button
. release selected button
↵ Enter 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:

In 1987, Macintosh Operating System 4.2 Easy Access provided MouseKeys support to all applications. Easy access was (de)activated by clicking the ⇧ Shift key five times.[ citation needed ]

By the early 2020s, with graphics tablets becoming more common, a configuration change may be required before enabling MouseKeys.[ citation needed ]

MouseKeysAccel

X window system MouseKeysAccel trajectory X Protocol MouseKeysAccel Control Trajectory.svg
X window system MouseKeysAccel trajectory
parametermeaning
mk_delaymilliseconds between the initial key press and first repeated motion event
mk_intervalmilliseconds between repeated motion events
mk_max_speedsteady speed (in action_delta units) applied each event
mk_time_to_maxnumber of events (count) accelerating to steady speed
mk_curveramp 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.

mk_curveresult
-1000uniform speed, linearly increasing action
0uniform acceleration, linearly increasing speed
1000uniform 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 Alt+⇧ Shift+Num Lock. [5] MouseKeys without acceleration (also known as plot mode) is sometimes available with ⇧ Shift+Num Lock. 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 5 (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 - (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 * (with the numeric keypad) selects the modifier button (nominally under the middle finger, middle button of a 3-button mouse). Typing / (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 5, all other numeric keys from the numeric keypad are used to move the pointer on the screen. For example, 8 will move the pointer upwards, while 1 will move it diagonally downwards to the left.

See also

Related Research Articles

<span class="mw-page-title-main">Computer mouse</span> Pointing device used to control a computer

A computer mouse is a hand-held pointing device that detects two-dimensional motion relative to a surface. This motion is typically translated into the motion of the pointer on a display, which allows a smooth control of the graphical user interface of a computer.

<span class="mw-page-title-main">Context menu</span> User interface element

A context menu is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation. A context menu offers a limited set of choices that are available in the current state, or context, of the operating system or application to which the menu belongs. Usually the available choices are actions related to the selected object. From a technical point of view, such a context menu is a graphical control element.

The keyboard for IBM PC-compatible computers is standardized. However, during the more than 30 years of PC architecture being frequently updated, many keyboard layout variations have been developed.

In computing, a modifier key is a special key on a computer keyboard that temporarily modifies the normal action of another key when pressed together. By themselves, modifier keys usually do nothing; that is, pressing any of the ⇧ Shift, Alt, or Ctrl keys alone does not (generally) trigger any action from the computer. They are commonly used in defined sequences of keys with another keys to trigger a specific action. These sequences are called keyboard shortcuts.

<span class="mw-page-title-main">Control key</span> Key on computer keyboards

In computing, a Control keyCtrl is a modifier key which, when pressed in conjunction with another key, performs a special operation. Similarly to the Shift key, the Control key rarely performs any function when pressed by itself. The Control key is located on or near the bottom left side of most keyboards, with many featuring an additional one at the bottom right.

<span class="mw-page-title-main">Function key</span> Key on a computer or terminal keyboard

A function key is a key on a computer or terminal keyboard that can be programmed to cause the operating system or an application program to perform certain actions, a form of soft key. On some keyboards/computers, function keys may have default actions, accessible on power-on.

A human interface device or HID is a type of computer device usually used by humans that takes input from or provides output to humans.

<span class="mw-page-title-main">Alt key</span> Computer key

The Alt keyAlt on a computer keyboard is used to change (alternate) the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing A will type the letter 'a', but holding down the Alt key while pressing A will cause the computer to perform an Alt+A function, which varies from program to program. The international standard ISO/IEC 9995-2 calls it Alternate key. The key is located on either side of the space bar, but in non-US PC keyboard layouts, rather than a second Alt key, there is an 'Alt Gr' key to the right of the space bar. Both placements are in accordance with ISO/IEC 9995-2. With some keyboard mappings, the right Alt key can be reconfigured to function as an AltGr key although not engraved as such.

<span class="mw-page-title-main">Button (computing)</span> Graphical user interface element

In computing, a button is a graphical control element that provides the user a simple way to trigger an event, like searching for a query at a search engine, or to interact with dialog boxes, like confirming an action.

A double-click is the act of pressing a computer mouse button twice quickly without moving the mouse. Double-clicking allows two different actions to be associated with the same mouse button. It was developed by Bill Atkinson of Apple Computer for their Lisa project. Often, single-clicking selects an object, while a double-click executes the function associated with that object. Following a link in a modern web browser is accomplished with only a single click, requiring the use of a second mouse button, "click and hold" delay, or modifier key to gain access to actions other than following the link. On touchscreens, the double-click is called "double-tap"; it's not used as much as double-click, but typically it functions as a zoom feature.

<span class="mw-page-title-main">Arrow keys</span> Set of keys on a typical computer keyboard

Arrow keys or cursor movement keys are keys on a computer keyboard that are either programmed or designated to move the cursor in a specified direction.

<span class="mw-page-title-main">Option key</span> Modifier key present on Apple keyboards

The Option key, , is a modifier key present on Apple keyboards. It is located between the Control key and the Command key on a typical Mac keyboard. There are two Option keys on modern Mac desktop and notebook keyboards, one on each side of the space bar.

<span class="mw-page-title-main">Apple keyboards</span> External computer keyboards developed by Apple Inc.

Apple Inc. has designed and developed many external keyboard models for use with families of Apple computers, such as the Apple II, Mac, and iPad. The Magic Keyboard and Magic Keyboard with Numeric Keypad designed to be used via either Bluetooth and USB connectivity, and have integrated rechargeable batteries; The Smart Keyboard and Magic Keyboard accessories for iPads are designed to be directly attached to and powered by a host iPad. All current Apple keyboards utilize low-profile key designs, and common modifier keys.

The X Window System core protocol is the base protocol of the X Window System, which is a networked windowing system for bitmap displays used to build graphical user interfaces on Unix, Unix-like, and other operating systems. The X Window System is based on a client–server model: a single server controls the input/output hardware, such as the screen, the keyboard, and the mouse; all application programs act as clients, interacting with the user and with the other clients via the server. This interaction is regulated by the X Window System core protocol. Other protocols related to the X Window System exist, both built at the top of the X Window System core protocol or as separate protocols.

In human–computer interfaces, the X keyboard extension or XKB is a part of the X Window System that extends the ability to control the keyboard over what is offered by the X Window System core protocol, and allows to use multiple keyboard layouts.

In computing, a keyboard shortcut is a sequence or combination of keystrokes on a computer keyboard which invokes commands in software.

<span class="mw-page-title-main">Mouse button</span> Electric switch on a computer mouse

A mouse button is an electric switch on a computer mouse which can be pressed (“clicked”) to select or interact with an element of a graphical user interface. Mouse buttons are most commonly implemented as miniature snap-action switches.

<span class="mw-page-title-main">Computer keyboard</span> Data input device

A computer keyboard is a peripheral input device modeled after the typewriter keyboard which uses an arrangement of buttons or keys to act as mechanical levers or electronic switches. Replacing early punched cards and paper tape technology, interaction via teleprinter-style keyboards have been the main input method for computers since the 1970s, supplemented by the computer mouse since the 1980s.

<span class="mw-page-title-main">Input device</span> Device that provides data and signals to a computer

In computing, an input device is a piece of equipment used to provide data and control signals to an information processing system, such as a computer or information appliance. Examples of input devices include keyboards, computer mice, scanners, cameras, joysticks, and microphones.

<span class="mw-page-title-main">Numeric keypad</span> Section of computer keyboard

A numeric keypad, number pad, numpad, or ten key, is the palm-sized, usually-17-key section of a standard computer keyboard, usually on the far right. It provides calculator-style efficiency for entering numbers.

References

  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 Archived 2010-06-12 at the Wayback Machine
  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. "xkeyboard-config manual page". 2012. Retrieved 15 March 2015.
  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)