diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-11-16 16:03:35 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-11-16 16:03:35 +0100 |
| commit | 44c1ee97c4fc4aa860c57966d938191b08d0994e (patch) | |
| tree | a36934f9406294f3174cdd6d433088a963a3e3a3 /src/main/kotlin/keybindings/FirmamentKeyboardState.kt | |
| parent | b132826a3149eae8fe2e3d4aa4d69d289557e2a4 (diff) | |
| download | Firmament-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.kt | 7 |
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) } } } |
