Prevent launching help when F1 is pressed

In some browsers, in particular Chrome OS, pressing F1 opens a help
screen. This can be suppressed by calling preventDefault() on the
event.
This commit is contained in:
Ian Flanigan 2019-01-04 00:28:58 +01:00
parent 8ee8b01d0a
commit 2d5972f7f5

View File

@ -791,6 +791,7 @@ function _keydown(evt) {
}
if (evt.keyCode === 112) { // F1 - Reset
cpu.reset();
evt.preventDefault(); // prevent launching help
} else if (evt.keyCode === 113) { // F2 - Full Screen
var elem = document.getElementById('screen');
if (document.webkitCancelFullScreen) {