[enhancement] Don't toggle module if key F3 is down

closes #1585
This commit is contained in:
Xiaro 2020-11-14 13:26:44 -05:00
parent 72f45d5698
commit 521db41e10
No known key found for this signature in database
GPG Key ID: 996D265D6E155377
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package me.zeroeightsix.kami.module
import me.zeroeightsix.kami.KamiMod
import me.zeroeightsix.kami.util.ClassUtils
import me.zeroeightsix.kami.util.TimerUtils
import org.lwjgl.input.Keyboard
object ModuleManager {
@ -49,7 +50,7 @@ object ModuleManager {
}
fun onBind(eventKey: Int) {
if (eventKey == 0) return // if key is the 'none' key (stuff like mod key in i3 might return 0)
if (eventKey == 0 || Keyboard.isKeyDown(Keyboard.KEY_F3)) return // if key is the 'none' key (stuff like mod key in i3 might return 0)
for (module in getModules()) {
if (module.bind.value.isDown(eventKey)) module.toggle()
}