mirror of
https://github.com/Pathduck/pathduck.github.io.git
synced 2025-12-29 11:45:20 -05:00
55 lines
1.5 KiB
HTML
Executable File
55 lines
1.5 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<script></script>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Keyboard Lock Demo</title>
|
|
|
|
<!-- import the webpage's stylesheet -->
|
|
<link rel="stylesheet" href="./style.css" />
|
|
|
|
<!-- import the webpage's javascript file -->
|
|
<script src="./script.js" defer></script>
|
|
</head>
|
|
|
|
<body>
|
|
<main>
|
|
<h1>Keyboard Lock Demo</h1>
|
|
|
|
<p>
|
|
Press the button to toggle full screen mode.
|
|
<button id="fullscreen" type="button">Enter full screen</button>
|
|
</p>
|
|
|
|
<div hidden>
|
|
Press the button to toggle the keyboard lock. When the keyboard lock is
|
|
active, try pressing <kbd>Command</kbd> + <kbd>T</kbd> (new
|
|
tab) or <kbd>Command</kbd> + <kbd>N</kbd> (new window). It
|
|
won't work when the keyboard lock is active.
|
|
<button id="keyboard" type="button">Activate keyboard lock</button>
|
|
<div>
|
|
Hold the <kbd>Esc</kbd> key for two seconds to exit full screen.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="info" hidden>
|
|
The keyboard lock has captured this key or key combination.
|
|
</div>
|
|
|
|
<div hidden>
|
|
Press the button to activate pointer lock.
|
|
<button id="pointer" type="button">Activate pointer lock</button>
|
|
<div>
|
|
Press the <kbd>Esc</kbd> key to exit pointer lock and full screen mode.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</main>
|
|
</body>
|
|
|
|
</html> |