Skip to Content
Platform.Ontology

Keyboard Lock

Captures keys like Escape and Alt+Tab while in fullscreen.

Does something on your deviceTyping and clipboardKeyboardWeb browsersWhile you use it

In one line

Can capture keys like Escape and Alt+Tab while the page is full screen

Captures keys like Escape and Alt+Tab while in fullscreen.

Lets games and remote desktops receive keys the browser normally keeps, so a site can trap Escape or Ctrl+W. Works only in fullscreen; a long-press of Escape always exits.

What it can and can't do

What the user does: You tap a full screen button in a game or remote desktop

It can

  • Take over keys the browser normally keeps, such as Escape or Alt+Tab
  • Pass those keys to a game or remote desktop session
  • Do this only while the page is in full screen

It cannot

  • Trap you for good; holding Escape for about 2 seconds always lets you out
  • Capture keys when the page is not full screen
  • Work in Firefox or Safari
  • Capture the operating system's own protected shortcuts like Ctrl+Alt+Delete

How it differs between platforms: Chrome and Edge support it on desktop. Firefox and Safari do not.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported682018-07-24None
EdgeSupported792020-01-15None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported682018-07-24None
Samsung InternetNot supportedNot availableNot listedNone

How a site asks for it

APInavigator.keyboard.lock(['Escape', 'KeyW']); unlock()
Permissions policykeyboard-map
Browser compat keysapi.Keyboard.lock
How access is grantedgesture
What the user seesNo prompt; works only while the page is in fullscreen.
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsWhile in fullscreen
How to take it backExit fullscreen or long-press Escape
Inside an iframeFrames inherit fullscreen

Typical flow

  1. Enter fullscreen
  2. keyboard.lock(keys)
  3. Locked keys sent to the page
  4. Hold Escape 2 seconds to exit

Data you get

What comes back: Key capture mode
Shape: none
How often: while fullscreen

No individual data fields. The signal is the access itself.

Technical limits

  • Fullscreen only
  • Cannot capture Ctrl+Alt+Del or OS shortcuts
  • Chromium only

The story

What it is

Lets a page grab keys like Escape and Alt+Tab when full screen.

For you

You go full screen in a game or remote desktop and keys like Escape go to the game instead of closing it. A message usually says 'Hold Escape to exit full screen'. You feel the page has taken over your keyboard.

For makers

Cloud games and remote work tools need every key to reach the remote computer. Without it, a press of Escape or Alt+Tab would break the stream. Makers also like how it keeps players inside the app.

Where you see it

TypeExampleApps
gamesA cloud gaming stream sends Escape, Alt and Windows keys to the remote PC, so an in game menu opens instead of exiting full screen.GeForce NOW, Xbox Cloud Gaming
enterpriseA remote desktop in the browser forwards Alt+Tab and Ctrl+W to the remote Windows machine.Azure Virtual Desktop, Amazon WorkSpaces, Chrome Remote Desktop
gamesA browser strategy or shooter game uses Escape for its pause menu while full screen.Krunker.io
educationAn online exam tool locks a student in full screen so keys cannot switch tabs.None named
creativeA web video editing or 3D tool receives all shortcuts while in full screen.None named
securityA bad page could try to trap you in full screen, which is why the browser shows a hold to exit message.None named

Risks

  • Can trap you in full screen
  • Fake lock screens

What the platform says

Good uses and abuse

Legitimate uses

  • Games
  • Remote desktop

Known abuse

  • Trapping people in a fullscreen scam page

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2018-07, Chrome 68: Keyboard Lock ships

Sources

How well checked: Based on official documentation.

On this page