diff options
Diffstat (limited to 'src/main/kotlin')
| -rw-r--r-- | src/main/kotlin/keybindings/GenericInputButton.kt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/kotlin/keybindings/GenericInputButton.kt b/src/main/kotlin/keybindings/GenericInputButton.kt index 39bb4dd..7a3d8d5 100644 --- a/src/main/kotlin/keybindings/GenericInputButton.kt +++ b/src/main/kotlin/keybindings/GenericInputButton.kt @@ -62,6 +62,7 @@ sealed interface GenericInputButton { companion object { + fun of(event: KeyInput) = ofKeyAndScan(event.keycode, event.scancode) fun escape() = ofKeyCode(GLFW.GLFW_KEY_ESCAPE) fun ofKeyCode(keyCode: Int): GenericInputButton = KeyCodeButton(keyCode) fun ofScanCode(scanCode: Int): GenericInputButton = ScanCodeButton(scanCode) |
