From 6ed766e1b9b56f7ee83e9a7054d77875095e3cd7 Mon Sep 17 00:00:00 2001 From: Abbie Reid <72096268+abbiereid@users.noreply.github.com> Date: Sun, 23 Feb 2025 00:08:51 +0000 Subject: [PATCH] fix: add KeyCode.SHORTCUT to CTRL Input Modifier --- fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt b/fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt index 03c59c616..316fbb36e 100644 --- a/fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt +++ b/fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt @@ -98,7 +98,7 @@ data class KeyTrigger return false return when (event.code) { - KeyCode.CONTROL -> modifier == InputModifier.CTRL + KeyCode.CONTROL, KeyCode.SHORTCUT -> modifier == InputModifier.CTRL KeyCode.SHIFT -> modifier == InputModifier.SHIFT KeyCode.ALT -> modifier == InputModifier.ALT else -> event.code == key @@ -155,7 +155,7 @@ data class MouseTrigger override fun isReleased(event: InputEvent): Boolean { if (event is KeyEvent) { return when (event.code) { - KeyCode.CONTROL -> modifier == InputModifier.CTRL + KeyCode.CONTROL, KeyCode.SHORTCUT -> modifier == InputModifier.CTRL KeyCode.SHIFT -> modifier == InputModifier.SHIFT KeyCode.ALT -> modifier == InputModifier.ALT else -> isTriggered(event)