Repository navigation
input: a pointer is no gamepad; document Bluetooth keyboards and mice - #20
KurdtNervanna wants to merge 1 commit into
Conversation
A trackpad, tablet or a pad's touchpad node (absolute X, 4+ buttons, no KEY_A) was taken for an unconfigured gamepad and got a player port. Move the node classification into classify_dev() and exclude pointers from the generic heuristic (explicit pad bits still win). Test: make check-input (classify). docs/input-design.md: what works for USB/Bluetooth keyboards and mice today and what is not built (core keyboard/mouse forwarding, menu cursor). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
A note on CI: the board script tests job fails on this PR, but not in the tests themselves. Its first step ( Once the server answers, a re-run of that job should be enough. I can't re-run it from the fork, so I'll leave it for you; tell me if you would rather I push a small commit to retrigger CI. |
|
Closing: this change is now the second commit of #19, which carries all the Bluetooth work in one PR (pad battery and PIN message, keyboards and mice, headphones prototype). |
A small fix and some documentation about Bluetooth (and USB) keyboards and mice, found while checking whether they work now that 0.1.5 can pair Bluetooth devices.
The fix
A pointer node (a trackpad, a tablet, or the touchpad node a PS4-style pad exposes) has an absolute X axis and four or more buttons but no
KEY_A. The generic check indev_open()took such a node for an unconfigured gamepad and gave it a player port, so a pad's touchpad could show the "unconfigured pad" toast and a trackpad could occupy a port. This pulls the node classification out intoclassify_dev()and excludes pointer nodes from that generic pad check. Nodes with explicit pad bits (BTN_GAMEPAD,BTN_JOYSTICK,BTN_TRIGGER_HAPPY) are still pads.Tests
Eight new cases in
frontend/tests/test_input.c(classify): a keyboard, a mouse, a trackpad, a media-key node, a gamepad and joystick-style pads.make check-inputpasses in WSL Ubuntu. Not run:check-ui, the other suites, and shellcheck. No real keyboard, mouse or pad was used.Docs
docs/input-design.md: a new section, "Keyboards and mice (USB and Bluetooth)", on what works today and what does not.README.md: one sentence saying a Bluetooth keyboard works like a USB one once paired, and mice are not used yet.What the section documents, from reading the code (not hardware):
Forwarding keyboard and mouse input to cores, a menu cursor, and a device-type label in the Bluetooth list are noted as not built. They are bigger changes and I have not started them.
Not tested on real hardware
Whether a real Bluetooth keyboard pairs, reconnects and drives the menus, and that a mouse pairs and does nothing, still needs a RetroStone2 and the devices.
🤖 Generated with Claude Code