Repository navigation
Conversation
nazbert
added a commit
to nazbert/Deckard
that referenced
this pull request
Jul 12, 2026
…etters Two BetterDeck defects (issues StreamController#17, StreamController#18): - reorder_physical_for_rotation computed out[p] = orig[get_logical_index(p)] where the contract is out[get_logical_index(p)] = orig[p] -- applying the INVERSE rotation. Self-inverse at 0/180, so it only showed under 90/270: key_states() scrambled and ControllerKey.__init__ reading the wrong key's press state on rotated decks. - set_key_callback_async / set_dial_callback_async / set_touchscreen_callback_async called THEMSELVES instead of the wrapped deck: RecursionError for any plugin using the async API. Now delegate to self.deck (the key variant keeps its logical-index remapper; dials and the touchscreen need no remap, matching their sync counterparts). tests/scenario_betterdeck_rotation.py verifies the map against get_physical_index as an independent oracle (a different formula) plus a hand-computed literal, and exercises all three async setters; red-checked: pre-fix rotation 90 misplaces every key and the setters recurse.
nazbert
added a commit
to nazbert/Deckard
that referenced
this pull request
Jul 12, 2026
…er#17 review round 1) The comment claimed key_states() "seems to give inverted values" -- that described the StreamController#17 rotation-map bug, which this MR fixes. key_states() now returns logical-indexed states, so self.index (a logical index) selects this key's own state. Rewrite the comment to state the actual purpose (seeding the cached press state for event_callback to diff against). Comment-only; no behavior change. Harness 89/89.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.