# Understanding Concurrent Input Mechanisms

## In brief

Goal
  Users can choose different ways of inputting content.
What to do
  Do not prevent users from switching their mode of input.
Why it's important
  People may not be able to work using just one input method.

## Intent

The intent of this Success Criterion is to ensure that people can use and switch between different modes of input when interacting with web content. Users may employ a variety of input mechanisms when interacting with web content. These may be a combination of mechanisms such as a keyboard or keyboard-like interfaces and pointer devices like a mouse, stylus or touchscreen.

Even though a device may have a primary input mechanism, the user may choose to employ alternative input mechanisms when interacting with the device. For example, the primary mechanism for mobile phones and tablets is the touchscreen. The user of these devices may choose to use a paired mouse or external keyboard as an alternative to using the touchscreen.

Users should be able to switch input mechanisms at any point should the user determine that certain tasks and interactions are more easily accomplished by using an alternative input mechanism. Content must not limit the user's interaction to any particular input mechanism unless the restriction is essential, or is required to ensure the security of the content or to respect user settings.

Note: A touch-typing web application, which teaches users how to touch-type on a keyboard and/or measures their proficiency and speed, would be an example of an essential limitation to a particular input mechanism.

## Benefits

- Users can interact with web content with whichever input mechanism is preferred and available to them.
- Users may switch between input mechanisms when they desire or the circumstances require it.
- Users are allowed to add and remove input mechanisms at any point, where supported by the operating system.

## Examples

- A user with mobility impairment pairs a mouse and keyboard to a mobile phone with a touchscreen. The phone can thereafter be operated by those input devices and the content does not accept the touchscreen as the only input mechanism.
- On a touch-enabled laptop with coarse precision, people who have difficulty activating a small target because of hand tremors, limited dexterity or other reasons are still able to interact with content using their keyboard and trackpad.
- A user starts interacting with a page using a desktop keyboard, and then attaches a secondary touch-enabled monitor. Content can be operated using this newly added input mechanism and does not assume that the keyboard, the first input mechanism it detected, is the only one in use.
- A speech input user navigates content using voice commands which translate to simulate mouse (and keyboard) commands. When talking with a colleague, however, the user turns speech recognition off and uses the mouse instead.
- A user opens a menu with a mouse, and then navigates between the menu items with arrow keys.

## Resources

- W3C Pointer Events - Level 2
- Patrick H. Lauke - Detecting touch: it's the 'why', not the 'how'
- Chris Wilson / Paul Kinlan: Touch And Mouse - Together Again For The First Time
- W3C Touch Events - Level 2: Interaction with Mouse Events and click
- W3C CSS Media Queries Level 4: Interaction Media Features

## Techniques

### Sufficient

- Only using high-level, input-agnostic event handlers, such as `focus`, `blur`, `click`, in Javascript (Potential future technique).
- Registering event handlers for keyboard/keyboard-like and pointer inputs simultaneously in Javascript; see Example 1 in Pointer Events Level 2 (Potential future technique)

## Failure

- F98