Skip to content

Commit 4b97dc5

Browse files
TobiasSchaffnerchombourger
authored andcommitted
fix(www): Disable browser shortcuts
The default browser keyboard actions interfere with the keyboard based interaction with the device. Disable them for the MTDA web interface. Signed-off-by: Tobias Schaffner <[email protected]>
1 parent bb683ff commit 4b97dc5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mtda/templates/index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@
109109
<script src="./assets/keysight.js"></script>
110110
<script type=text/javascript>
111111
window.addEventListener("keydown", function(event) {
112-
var key = keysight(event).char
113-
console.log("#### <KEY> " + key)
112+
var key = keysight(event).char;
113+
event.preventDefault();
114+
console.log("#### <KEY> " + key);
114115
$.getJSON('./keyboard-input', {input: key}, function(key) {
115116
// do nothing
116117
});

0 commit comments

Comments
 (0)