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

I've long thought we should be adding something along these lines, without being exactly sure about what we need to add:
* do we need to distinguish between keyboards with and without a numpad?
* do we need to distinguish between computer keyboards and feature phone keyboard that only have a numpad and a handful of extra buttons? How do you classify less-than-full-but-more-than phone things like this: https://icdn4.digitaltrends.com/image/blackberry-passport-simple-720x720.jpg?ver=1.jpg
* what about things like gamepads that aren't keyboards but do have buttons? If gamepads aren't keyboards, what is this: https://images.techhive.com/images/idge/imported/imageapi/2014/06/27/21/igrip-100351419-gallery.idge.jpg ?  based on what criteria?
* distinguish between keyboard with or without a tab key? with or without arrow keys?
* This probably counts as a physical keyboard rather than on virtual one, on account of not being on screen. But are we sure? That probably depends on the use cases: https://images.techhive.com/images/idge/imported/imageapi/2014/06/27/21/virtual_keyboard-100351425-gallery.idge.jpg
* Do we distinguish between keyboard layouts? Maybe we don't need to distinguish between qwerty and azerty layout since they can type the same characters (mostly), but we do need to distinguish between keyboards that can type ascii letters vs those that can only type other stuff, like https://www.dsi-keyboards.com/wp-content/uploads/2015/03/KA-Thai-20868.jpg
* Do [chorded keyboards](https://en.wikipedia.org/wiki/Stenotype) fall into any of the categories we're otherwise deciding on? if not, does it mean we got them wrong, or that we don't care about such devices?
* in the case of software keyboard, do we distinguish between those that reduce the viewport size when the pop up, and those that get overlaid over the viewport?
* Do we need the primary / non primary input distinction?

I don't have good answers to these questions.

To be clear, I don't mean that we need to have a super rich set of media queries to distinguish between everything. I do mean that the reality of input devices is extremely varied, and that how much we want to expose, and along which axises is not an obvious question. The answers will depend on which set of use cases we want to address. We have a few identified use cases but overall we haven't yet tried to do a broad survey of what people were trying to achieve with these.

Related reading:
* https://github.com/w3c/csswg-drafts/issues/621
    * https://bugzilla.mozilla.org/show_bug.cgi?id=787444
    * https://lists.w3.org/Archives/Public/www-style/2015Apr/0052.html
    * https://discourse.wicg.io/t/onscreen-keyboard-api-to-obtain-dimensions-presence-of-the-keyboard/674
    * https://discourse.wicg.io/t/exposing-a-users-input-modality/1067
* https://github.com/w3c/csswg-drafts/issues/1911


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

Received on Thursday, 25 April 2019 09:29:10 UTC