Fix : Override browser default shortcuts on Linux/Windows system #8
|
@ -1,12 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<title>Elm UI Website</title>
|
<title>Elm UI Website</title>
|
||||||
<style>
|
<style>
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Courier Prime';
|
font-family: "Courier Prime";
|
||||||
src: url('assets/CourierPrime-Regular.ttf') format('truetype');
|
src: url("assets/CourierPrime-Regular.ttf") format("truetype");
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,22 @@
|
||||||
<script src="ports.websocket.js"></script>
|
<script src="ports.websocket.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var app = Elm.Main.init({
|
var app = Elm.Main.init({
|
||||||
node: document.getElementById('elm')
|
node: document.getElementById("elm"),
|
||||||
});
|
});
|
||||||
initSockets(app);
|
initSockets(app);
|
||||||
|
const allowedKeys = ["l", "d"];
|
||||||
|
document.addEventListener("keydown", (event) => {
|
||||||
|
if (
|
||||||
|
event.ctrlKey &&
|
||||||
|
allowedKeys.includes(event.key.toLowerCase())
|
||||||
|
) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === "Tab") {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue