Keyboard lock
Limited availability
The navigator.keyboard.lock()
API allows you to capture keys that are normally reserved by the operating system. It can be used to provide an immersive fullscreen experience such as games.
To learn more, see
Keyboard: lock() method at MDN.
Compatibility
- Chrome 68 Released on 2018-07-24
- Chrome Android 68 Released on 2018-07-24
- Edge 79 Released on 2020-01-15
- Firefox ❌ Search for bugs Search for standards position
- Firefox for Android ❌ Search for bugs Search for standards position
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
Specifications
- Keyboard Lock, from Web Platform Incubator Community Group (W3C).