mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 05:43:34 +00:00
Merge pull request #3510 from RobLoach/patch-4
emscripten: Disable default browser keys
This commit is contained in:
commit
fab1c0a75c
@ -230,5 +230,15 @@ $(function() {
|
|||||||
$.getScript(core + '_libretro.js', function () {
|
$.getScript(core + '_libretro.js', function () {
|
||||||
// Activate the Start RetroArch button.
|
// Activate the Start RetroArch button.
|
||||||
$('#btnStart').removeClass('disabled');
|
$('#btnStart').removeClass('disabled');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempt to disable some default browser keys.
|
||||||
|
*/
|
||||||
|
window.addEventListener('keydown', function(e) {
|
||||||
|
// Space key, arrows, and F1.
|
||||||
|
if([32, 37, 38, 39, 40, 112].indexOf(e.keyCode) > -1) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user