Skip to content

Commit

Permalink
fix(www): Disable browser shortcuts
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
TobiasSchaffner committed Feb 29, 2024
1 parent e170d81 commit 04c3ccd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mtda/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@
<script src="./assets/keysight.js"></script>
<script type=text/javascript>
window.addEventListener("keydown", function(event) {
var key = keysight(event).char
console.log("#### <KEY> " + key)
var key = keysight(event).char;
event.preventDefault();
console.log("#### <KEY> " + key);
$.getJSON('./keyboard-input', {input: key}, function(key) {
// do nothing
});
Expand Down

0 comments on commit 04c3ccd

Please sign in to comment.