Prevent keybind presses when GUI active
This commit is contained in:
@@ -26,6 +26,10 @@ function bindAccountKey(key, keyState) {
|
|||||||
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Binded key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||||
keyBinds.push(toInteger(key));
|
keyBinds.push(toInteger(key));
|
||||||
bindKey(toInteger(key), keyState, function(event) {
|
bindKey(toInteger(key), keyState, function(event) {
|
||||||
|
if(isAnyGUIActive()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(hasKeyBindDelayElapsed()) {
|
if(hasKeyBindDelayElapsed()) {
|
||||||
if(canLocalPlayerUseKeyBinds()) {
|
if(canLocalPlayerUseKeyBinds()) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
logToConsole(LOG_DEBUG, `[VRR.KeyBind]: Using keybind for key ${toUpperCase(getKeyNameFromId(key))} (${key})`);
|
||||||
|
|||||||
Reference in New Issue
Block a user