Initial import

This commit is contained in:
Admin Nasledstvo
2026-05-01 20:52:04 +03:00
commit ac168868ee
10028 changed files with 2337954 additions and 0 deletions
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Key Press Detection</title>
</head>
<body>
<p>Press a key to see its code and name:</p>
<p id="keyInfo">Key code: <span id="keyCode"></span>, Key name: <span id="keyName"></span></p>
<script>
// Get a reference to the elements for displaying key information
const keyInfo = document.getElementById('keyInfo');
const keyCodeSpan = document.getElementById('keyCode');
const keyNameSpan = document.getElementById('keyName');
// Add a keypress event listener to the document
document.addEventListener('keypress', (event) => {
// Get the key code and key name from the event object
const keyCode = event.keyCode || event.which;
const keyName = event.key;
// Display the key code and key name
keyCodeSpan.textContent = keyCode;
keyNameSpan.textContent = keyName;
});
</script>
</body>
</html>