ArticleslgStudy

computer science

Mouse keys

Mouse keys is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Mouse keys rather than just read about it. In short: 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.

Mouse keys — main illustration
Mouse keys — illustration

Key takeaways

  • Mouse keys belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Mouse keys to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Mouse keys from memory before moving on to harder problems.

Reference excerpt

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.

Layout

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 ⇧ Shift key five times. By the early 2020s, with graphics tablets becoming more common, a configuration change may be required before enabling MouseKeys.

MouseKeysAccel

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. 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.

a c t i o n _ d e l t a × m k _ m a x _ s p e e d × ( i m k _ t i m e _ t o _ m a x ) 1000 + m k _ c u r v e 1000 {\displaystyle \mathrm {action\_delta} \times \mathrm {mk\_max\_speed} \times \left({\frac {i}{\mathrm {mk\_time\_to\_max} }}\right)^{\frac {1000+\mathrm {mk\_curve} }{1000}}}

These five parameters are configurable.

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. 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: 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 (Hardware → Input Devices → Mouse → Keyboard Navigation) MouseKeys for Apple Inc.'s macOS is enabled and configured via the Accessibility ([apple] → System Preferences → Accessibility → Mouse & Trackpad). Microsoft changed the method of enabling between Windows 2000, Windows XP (added diagonal cursor movement and MouseKeysAccel), and Windows Vista.

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 FilterKeys – Accessibility feature of Microsoft Windows Sticky keys – Accessibility feature ToggleKeys – Accessibility function for Microsoft Windows Virtual keyboard – Software component

References

Illustrations

Mouse keys: X window system MouseKeysAccel trajectory
X window system MouseKeysAccel trajectory

Worked examples

Example 1 — a first encounter with Mouse keys

Start with the simplest possible case. Write down what Mouse keys claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Mouse keys before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Mouse keys ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Mouse keys

In research
Mouse keys appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Mouse keys in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Mouse keys is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer accessibility, Computing input devices, Ergonomics, so understanding it makes those chapters shorter.
In everyday life
Look for Mouse keys outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Mouse keys in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Mouse keys means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Mouse keys out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Mouse keys in simple terms?

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.

Why does Mouse keys matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Mouse keys?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Mouse keys.

Tags

  • Computer accessibility
  • Computing input devices
  • Ergonomics
  • User interface techniques

Keep exploring