[uievents] Whethere KeyboardEvent.location depends on .code or .key? (#62)

I realized that KeyboardEvent.location definition isn't clear to me.

If KeyboardEvent.location depends on .code value (I feel that this is intended), e.g., even if ControlLeft key is mapped to CapsLock, the value should be DOM_KEY_LOCATION_LEFT. And also if CapsLock key is mapped to left Control key, the value should be DOM_KEY_LOCATION_STANDARD.

Otherwise, i.e., KeyboardEvent.location depends on .key value (this is current Firefox for desktop's implementation), e.g., if ControlLeft key is mapped to CapsLock, the value should be DOM_KEY_LOCATION_STANDARD. And also if CapsLock key is mapped to left Control key, the value should be DOM_KEY_LOCATION_LEFT.


Although, physical key position can be retrieved with .code attribute, but left vs. right cannot be retrieved from .key attribute, so, web developers might expect the latter behavior.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/62

Received on Wednesday, 2 December 2015 10:18:11 UTC