summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-07-09 20:34:13 +0000
committerDevaev Maxim <[email protected]>2018-07-09 20:34:13 +0000
commit2485f8e54800009ff63324a51e45d28f9a80527c (patch)
tree059ed4b2a096620b60eb76ec75c60577fcbb370c /kvmd
parent670be5434892f706d02f68cc0045567f4e084ce1 (diff)
web: prevent default handler on key event
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/web/index.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/kvmd/web/index.html b/kvmd/web/index.html
index 3bfe8cc5..6fb3236e 100644
--- a/kvmd/web/index.html
+++ b/kvmd/web/index.html
@@ -40,6 +40,9 @@ function onWsMessage(message) {
function onKeyEvent(event, state) {
// TODO: run this code under the lock
+ if (!event.metaKey) { // https://github.com/wesbos/keycodes/blob/gh-pages/scripts.js
+ event.preventDefault();
+ }
console.log("Key", (state ? "pressed:" : "released:"), event)
ws.send(JSON.stringify({
event_type: "key",