Re: [w3c/uievents] Insert Key is not part of the spec as a modifier key (#273)

But those are all application specific - anyone could create an application that uses any key as a "modifier". That doesn't make it a compelling reason to add to the specification.

The purpose of the "modifier state" is to expose the native OS flags in a platform-independent way. AFAICT no native OS assigns special status to the Insert key as a modifier, whereas they all have special status for Shift, Control, and so on.

So, to directly address Grisha's original comment: Insert was not included in the list of modifier keys because it isn't an OS defined modifier key. And if we don't restrict our definition of modifier key to match the one used by every OS, then literally every key (even on devices like gamepads) is a potential candidate to include.

Our reliance on the OS definition of modifier key means that supporting modifier keys like Shift and Control is fairly easy (since the info is already there). Adding a key outside of this OS-defined set means that the UA would have to do all the work of tracking this key state. So this is a non-trivial proposal.

I would be more willing to support this you could convince at least one major OS vendor to include it in their native key event flags.

I also feel like this is really asking for an API to get the set of keys that are currently being held down (or whether a single key is currently down). We've discussed that in the past and it was agreed that it would be Quite Useful but there would be technical challenges to do it properly (since most OSs don't provide this, it would be error prone). But other than he technical challenges, I don't recall the specific details why we dropped the proposal. We could revive it if people are interested, but I don't have high hopes for it based on the technical issues.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/273#issuecomment-676603289

Received on Wednesday, 19 August 2020 18:59:57 UTC