- From: Hallvord R. M. Steen <hallvord@opera.com>
- Date: Fri, 26 Oct 2012 09:10:14 +0200
- To: www-dom@w3.org, "Mounir Lamouri" <mounir@lamouri.fr>
- Cc: "Ojan Vafai" <ojan@chromium.org>
Mounir Lamouri <mounir@lamouri.fr> skreiv Thu, 25 Oct 2012 18:50:55 +0200 > So Opera would agree with Mozilla to have an attribute on the > KeyboardEvent interface that represents the physical key that has been > pressed? Yes, generally I think we see the use cases for that, but the devil is in the details and it's not clear to me from what you say below what use case you're actually trying to fulfil here: > However, I think we should use a new attribute instead of 'key'. > Otherwise, on my laptop, it would be hard to know what this would be > doing: > { char: '', key: 'Home' } > it could be the 'Home' key or the 'BrightnessUp' depending on my > pressing 'Fn' or not. But this has nothing to do with identifying the "physical key". The "key:Home" property does a pretty good job at that (if we spec it like I think we agree we should, i.e. disregarding modifier keys - that presumably includes Fn). Here you seem to be looking for a way to determine what the key would do if the script did not interfere, sort of like an event.nativeShortcut property. That seems like a very different use case to me. In general, the OS or platform will always be able to filter out and respond to some keypresses, like Fn+function keys or ctrl-alt-delete, we probably can't demand that a web app should be able to respond to absolutely every key combination. > Generally speaking, as long as modifiers happen in keys without a char > representation, 'key' would be the only way to know what's the final > value so to know the actual physical key value, we will need a new > attribute. I'm still confused because you seem to conflate they key's physical position with its intended action - what exactly do you mean by "physical key value"? Apologies if we're talking past each other, you can take comfort in the fact that if we are, I'm probably making a fool of myself in public. ;-) -- Hallvord R. M. Steen Core tester, Opera Software
Received on Friday, 26 October 2012 07:10:56 UTC