Open Bug 700123 Opened 13 years ago Updated 12 days ago

Keyboard Lock

Categories

(Core :: DOM: Events, enhancement, P3)

enhancement

Tracking

()

UNCONFIRMED
Webcompat Priority P3

People

(Reporter: boaz, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: parity-chrome, parity-edge, parity-opera)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2




Expected results:


* Use case
  * When I crouch and walk forward in a game, the window should not close
* Request description
  * allow developer to lock keyboard. Similar to emerging mouselock spec.
* Target W3C group
  * Web events group
* Traction
  * chrome issue: http://code.google.com/p/chromium/issues/detail?id=84332
  * chrome design doc draft: https://sites.google.com/a/chromium.org/dev/developers/design-documents/reserved-keys-api
OS: Mac OS X → All
Hardware: x86 → All
Why would the window close when you are crouching and walking? If you have focus on a canvas object or something and press say ctrl+w it doesn't close the window in any browser.
Severity: normal → enhancement
Component: General → DOM: Events
QA Contact: general → events
(In reply to warcraftthreeft from comment #1)
> If you have
> focus on a canvas object or something and press say ctrl+w it doesn't close
> the window in any browser.

That should not be true in Chrome, where we prevent some keystrokes (e.g. ctrl-w) from being sent to webpages by default so badly-behaving pages don't result in the user being unable to close/change tabs, etc.
Woah, you're right. I just tested it with one of my canvas projects. Backspace goes back a page in Chrome (along with the ctrl+w close). I guess this is needed. Didn't realize user agents could take precedent over a web page with focus and key events.
Presumably the relevant spec here is now: https://w3c.github.io/keyboard-lock/
Chrome seems to be shipping this in the next release:

https://www.chromestatus.com/features/5642959835889664
Priority: -- → P3

Referenced in https://github.com/microsoft/vscode/issues/85252 . I wonder if other editors also run into this.

Webcompat Priority: --- → ?
Webcompat Priority: ? → revisit
Webcompat Priority: revisit → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.