Skip to content

adbkeyboard: Improve register 2 emulation - #225

Merged
dingusdev merged 1 commit into
dingusdev:masterfrom
mihaip:upstream-adb-register-2
Sep 26, 2026
Merged

dingusdev merged 1 commit into
dingusdev:masterfrom
mihaip:upstream-adb-register-2

Conversation

@mihaip

@mihaip mihaip commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

We were defaulting the contents of register 2 to zeros, but that actually means an active state (modifier key is being held down and/or an LED is on, see Table 8-11 in "Guide to Macintosh Family Hardware (2nd Edition, 1990)"). We should default to 1, and also actually track and report modifier key state.

This affected the BeOS boot chooser - it gets modifiers from register 2, and the 0 value made it think that all modifiers were being held. In turn that would make it bring up the "choose device" screen, instead of automatically continuing with the previously-selected one.

Classic Mac OS was not affected (e.g. for hold down shift to disable extensions) because it consumes key updates from register 0 and maintains its own modifier state.

We were defaulting the contents of register 2 to zeros, but that
actually means an active state (modifier key is being held down and/or
an LED is on, see Table 8-11 in "Guide to Macintosh Family Hardware
(2nd Edition, 1990)"). We should default to 1, and also actually track
and report modifier key state.

This affected the BeOS boot chooser - it gets modifiers from
register 2, and the 0 value made it think that all modifiers were being
held. In turn that would make it bring up the "choose device" screen,
instead of automatically continuing with the previously-selected one.

Classic Mac OS was not affected (e.g. for hold down shift to disable
extensions) because it consumes key updates from register 0 and
maintains its own modifier state.
@dingusdev
dingusdev merged commit 5b292af into dingusdev:master Sep 26, 2026
7 checks passed
@mihaip
mihaip deleted the upstream-adb-register-2 branch September 26, 2026 22:46
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