Skip to content

Commit

Permalink
fix: add KeyCode.SHORTCUT to CTRL Input Modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
abbiereid authored Feb 24, 2025
1 parent 9c18fa8 commit 522d2ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fxgl-core/src/main/kotlin/com/almasb/fxgl/input/Triggers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 522d2ec

Please sign in to comment.