Re: [csswg-drafts] [mediaqueries-5] Detect physical keyboard (keyboard capable of shortcuts?) (#3871)

Media Queries are not intended to be used with CSS only. If they were limited to styling, I’d agree that there should only be minimal support for keyboard detection. 
If the _displaying keyboard (shortcut) hints_ use case is valid, MQ would need to be powerful enough to distinguish different types of keyboards and layouts. 

For the presence of a keyboard, MQ should distinguish between _always_ and _on demand_, but perhaps more importantly between _separate_ from the viewport and semi-transparently _overlaying_, opaquely _obstructing_ and intrusively _shrinking_ it. 
For virtual keyboards in particular, there may be reasonable desires to know whether it is used by _swiping_ or _typing/pressing_ and whether 1 finger or thumb, 2 fingers/thumbs from separate hands or all fingers 1 from 1 or 2 hands are typically used. (Key chaining is a bit exotic in alphabetic cultures, but may abhustend describe Asian IMEs in particular.)

For some keys, it could be enough to provide access to locale or system-specific labels elsewhere, e.g. `Cmd` (Mac) vs. `Ctrl` (EN) vs. `Strg` (DE). That is probably outside the scope of both, CSS and MQ (except in `env()` perhaps). 

The exact availability of key group levels like _shift [lock]_ and _alt/option_, perhaps does not need to be exposed to authors. 

Authors would probably want to know sometimes whether the keyboard provides 1D sequential navigation of interaction focus (e.g. with tab) or 2D spatial viewpoint navigation (with 4 to 8 arrow keys, d-pad or joystick, but also mouse wheel and page +/-, home and end keys). 

I believe there could be valid use case for information about the following key types as well:

  - compose, dead (accent) or hold (variants)
  - escape/cancel/back or enter/return/submit/confirm/select/OK
  - forward delete/erase and backwards delete/backspace
  - (context) menu
  - digits (numeric input)
    - row
    - phone-pad, T9
    - calculator-pad
  - letters, syllabograms (linguistic input)
    - words (suggestions, autocomplete)
  - colors (teletext)
  - playback (like play/pause, skip, stop, record)


-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3871#issuecomment-1853831099 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 13 December 2023 12:30:11 UTC