aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/keybindings/FirmamentKeyboardState.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-11-16 16:03:35 +0100
committerLinnea Gräf <nea@nea.moe>2025-11-16 16:03:35 +0100
commit44c1ee97c4fc4aa860c57966d938191b08d0994e (patch)
treea36934f9406294f3174cdd6d433088a963a3e3a3 /src/main/kotlin/keybindings/FirmamentKeyboardState.kt
parentb132826a3149eae8fe2e3d4aa4d69d289557e2a4 (diff)
downloadFirmament-44c1ee97c4fc4aa860c57966d938191b08d0994e.tar.gz
Firmament-44c1ee97c4fc4aa860c57966d938191b08d0994e.tar.bz2
Firmament-44c1ee97c4fc4aa860c57966d938191b08d0994e.zip
snapshot: main menu
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)
}
}
}