mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-04 18:47:09 +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 () {
|
||||
// Activate the Start RetroArch button.
|
||||
$('#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