aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/keybindings/FirmamentKeyboardState.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/keybindings/FirmamentKeyboardState.kt')
-rw-r--r--src/main/kotlin/keybindings/FirmamentKeyboardState.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/kotlin/keybindings/FirmamentKeyboardState.kt b/src/main/kotlin/keybindings/FirmamentKeyboardState.kt
index 65288bc..dc20630 100644
--- a/src/main/kotlin/keybindings/FirmamentKeyboardState.kt
+++ b/src/main/kotlin/keybindings/FirmamentKeyboardState.kt
@@ -2,6 +2,7 @@ package moe.nea.firmament.keybindings
import java.util.BitSet
import org.lwjgl.glfw.GLFW
+import net.minecraft.client.input.KeyInput
object FirmamentKeyboardState {
@@ -14,10 +15,10 @@ object FirmamentKeyboardState {
}
@Synchronized
- fun maintainState(key: Int, scancode: Int, action: Int, modifiers: Int) {
+ fun maintainState(keyInput: KeyInput, action: Int) {
when (action) {
- GLFW.GLFW_PRESS -> pressedScancodes.set(scancode)
- GLFW.GLFW_RELEASE -> pressedScancodes.clear(scancode)
+ GLFW.GLFW_PRESS -> pressedScancodes.set(keyInput.scancode)
+ GLFW.GLFW_RELEASE -> pressedScancodes.clear(keyInput.scancode)
}
}
}