diff options
Diffstat (limited to 'src/compat/yacl/java')
| -rw-r--r-- | src/compat/yacl/java/KeybindingController.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compat/yacl/java/KeybindingController.kt b/src/compat/yacl/java/KeybindingController.kt index 204d521..e9bd500 100644 --- a/src/compat/yacl/java/KeybindingController.kt +++ b/src/compat/yacl/java/KeybindingController.kt @@ -10,6 +10,7 @@ import net.minecraft.text.Text import moe.nea.firmament.gui.config.KeyBindingHandler import moe.nea.firmament.gui.config.KeyBindingStateManager import moe.nea.firmament.gui.config.ManagedOption +import moe.nea.firmament.keybindings.GenericInputButton import moe.nea.firmament.keybindings.SavedKeyBinding class KeybindingController( @@ -57,11 +58,11 @@ class KeybindingWidget( } override fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean { - return sm.keyboardEvent(keyCode, true) + return sm.keyboardEvent(GenericInputButton.ofKeyAndScan(keyCode, scanCode), true) } override fun keyReleased(keyCode: Int, scanCode: Int, modifiers: Int): Boolean { - return sm.keyboardEvent(keyCode, false) + return sm.keyboardEvent(GenericInputButton.ofKeyAndScan(keyCode, scanCode), false) } override fun unfocus() { |
