aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/keybindings/SavedKeyBinding.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-06-04 18:45:39 +0200
committerLinnea Gräf <nea@nea.moe>2025-06-04 18:45:39 +0200
commit3695589a47c7434f4c5abbe2ebead052c0d07ba6 (patch)
treea42301bac4000cd1f4f6a10d16dfb5a779f12d97 /src/main/kotlin/keybindings/SavedKeyBinding.kt
parent9c32c6e824058181002b0518e7e12c3425715b4b (diff)
downloadFirmament-3695589a47c7434f4c5abbe2ebead052c0d07ba6.tar.gz
Firmament-3695589a47c7434f4c5abbe2ebead052c0d07ba6.tar.bz2
Firmament-3695589a47c7434f4c5abbe2ebead052c0d07ba6.zip
feat: Add macro editing UI
Diffstat (limited to 'src/main/kotlin/keybindings/SavedKeyBinding.kt')
-rw-r--r--src/main/kotlin/keybindings/SavedKeyBinding.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/keybindings/SavedKeyBinding.kt b/src/main/kotlin/keybindings/SavedKeyBinding.kt
index 5429844..d85c303 100644
--- a/src/main/kotlin/keybindings/SavedKeyBinding.kt
+++ b/src/main/kotlin/keybindings/SavedKeyBinding.kt
@@ -57,7 +57,9 @@ data class SavedKeyBinding(
fun isShiftDown() = InputUtil.isKeyPressed(h, GLFW.GLFW_KEY_LEFT_SHIFT)
|| InputUtil.isKeyPressed(h, GLFW.GLFW_KEY_RIGHT_SHIFT)
- }
+ fun unbound(): SavedKeyBinding =
+ SavedKeyBinding(GLFW.GLFW_KEY_UNKNOWN)
+ }
fun isPressed(atLeast: Boolean = false): Boolean {
if (!isBound) return false