mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Add option to disable alt key
This commit is contained in:
parent
9c8ae86d1e
commit
6389dfbfb9
@ -452,6 +452,9 @@ class EJS_GameManager {
|
||||
setKeyboardEnabled(enabled) {
|
||||
this.functions.setKeyboardEnabled(enabled === true ? 1 : 0);
|
||||
}
|
||||
setAltKeyEnabled(enabled) {
|
||||
this.functions.setKeyboardEnabled(enabled === true ? 3 : 2);
|
||||
}
|
||||
}
|
||||
|
||||
window.EJS_GameManager = EJS_GameManager;
|
||||
|
||||
@ -4274,6 +4274,8 @@ class EmulatorJS {
|
||||
this.createBottomMenuBarListeners();
|
||||
} else if (option === "keyboardInput") {
|
||||
this.gameManager.setKeyboardEnabled(value === "enabled");
|
||||
} else if (option === "altKeyboardInput") {
|
||||
this.gameManager.setAltKeyEnabled(value === "enabled");
|
||||
} else if (option === "lockMouse") {
|
||||
this.enableMouseLock = (value === "enabled");
|
||||
}
|
||||
@ -4830,6 +4832,11 @@ class EmulatorJS {
|
||||
"enabled": this.localization("Enabled"),
|
||||
}, ((this.defaultCoreOpts && this.defaultCoreOpts.useKeyboard === true) ? "enabled" : "disabled"), inputOptions, true);
|
||||
|
||||
addToMenu(this.localization("Forward Alt key"), "altKeyboardInput", {
|
||||
"disabled": this.localization("Disabled"),
|
||||
"enabled": this.localization("Enabled"),
|
||||
}, "disabled", inputOptions, true);
|
||||
|
||||
addToMenu(this.localization("Lock Mouse"), "lockMouse", {
|
||||
"disabled": this.localization("Disabled"),
|
||||
"enabled": this.localization("Enabled"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user