Skip to content

Update keyboard bindings for DEVICE_ID_KEYBOARD#2572

Merged
manuq merged 1 commit into
mainfrom
wjt/update-keyboard-bindings-for-device-id-keyboard
Jul 20, 2026
Merged

Update keyboard bindings for DEVICE_ID_KEYBOARD#2572
manuq merged 1 commit into
mainfrom
wjt/update-keyboard-bindings-for-device-id-keyboard

Conversation

@wjt

@wjt wjt commented Jul 20, 2026

Copy link
Copy Markdown
Member

Update keyboard bindings for DEVICE_ID_KEYBOARD

Prior to Godot 4.7, keyboard (and mouse) events were reported with
device set to 0. But this overlaps with 0 meaning "the 0th
gamepad".

Godot 4.7 introduced DEVICE_ID_KEYBOARD = 16 (and DEVICE_ID_MOUSE = 32). The gap is future-proofing for supporting multiple keyboards.

Our InputEventKey bindings in project.godot are stored with device
0. If you make any changes to our project.godot with 4.7 and save it,
these are updated to device 16. Commit this.

Prior to Godot 4.7, keyboard (and mouse) events were reported with
`device` set to `0`. But this overlaps with `0` meaning "the 0th
gamepad".

Godot 4.7 introduced `DEVICE_ID_KEYBOARD = 16` (and `DEVICE_ID_MOUSE =
32`). The gap is future-proofing for supporting multiple keyboards.

Our `InputEventKey` bindings in `project.godot` are stored with device
0. If you make any changes to our `project.godot` with 4.7 and save it,
these are updated to device 16. Commit this.
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/update-keyboard-bindings-for-device-id-keyboard/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@manuq
manuq merged commit 0716b35 into main Jul 20, 2026
7 checks passed
@manuq
manuq deleted the wjt/update-keyboard-bindings-for-device-id-keyboard branch July 20, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants