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 authored and chombourger committed Feb 29, 2024
1 parent bb683ff commit 4b97dc5
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 4b97dc5

Please sign in to comment.