Skip to content

Commit 522d2ec

Browse files
authored
fix: add KeyCode.SHORTCUT to CTRL Input Modifier
1 parent 9c18fa8 commit 522d2ec

File tree

1 file changed

+2
-2
lines changed
  • fxgl-core/src/main/kotlin/com/almasb/fxgl/input

1 file changed

+2
-2
lines changed

fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ data class KeyTrigger
9898
return false
9999

100100
return when (event.code) {
101-
KeyCode.CONTROL -> modifier == InputModifier.CTRL
101+
KeyCode.CONTROL, KeyCode.SHORTCUT -> modifier == InputModifier.CTRL
102102
KeyCode.SHIFT -> modifier == InputModifier.SHIFT
103103
KeyCode.ALT -> modifier == InputModifier.ALT
104104
else -> event.code == key
@@ -155,7 +155,7 @@ data class MouseTrigger
155155
override fun isReleased(event: InputEvent): Boolean {
156156
if (event is KeyEvent) {
157157
return when (event.code) {
158-
KeyCode.CONTROL -> modifier == InputModifier.CTRL
158+
KeyCode.CONTROL, KeyCode.SHORTCUT -> modifier == InputModifier.CTRL
159159
KeyCode.SHIFT -> modifier == InputModifier.SHIFT
160160
KeyCode.ALT -> modifier == InputModifier.ALT
161161
else -> isTriggered(event)

0 commit comments

Comments
 (0)