Skip to content

Commit

Permalink
GUI: Disable keyboard shortcuts (Fixes #705)
Browse files Browse the repository at this point in the history
  • Loading branch information
pouryafard75 authored and tsantalis committed Apr 15, 2024
1 parent 2048726 commit a5dea75
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/main/resources/web/dist/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@ $(function(){

$("body").keypress(function (event) {
switch (event.which) {
case 116:
$('html, body').animate({scrollTop: 0}, 100);
break;
case 98:
$("html, body").animate({ scrollTop: $(document).height() }, 100);
break;
case 113:
window.location = "/quit";
break;
case 108:
window.location = "/list";
break;
//TODO: Disable hotkeys (temp)

// case 116:
// $('html, body').animate({scrollTop: 0}, 100);
// break;
// case 98:
// $("html, body").animate({ scrollTop: $(document).height() }, 100);
// break;
// case 113:
// window.location = "/quit";
// break;
// case 108:
// window.location = "/list";
// break;
}
});
});

1 comment on commit a5dea75

@koppor
Copy link

@koppor koppor commented on a5dea75 Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pouryafard75 I think, one can add an if before line 28 filtering out the target searchbar. See https://stackoverflow.com/a/70763668/873282 for code (using mouse clicks, but should be similr)

Please sign in to comment.