Repository navigation
Input: a keyboard holds its own modifiers, and one that goes lets go no other's - #130
Merged
Merged
Conversation
…no other's The compositor and the console kept one flat set of the modifiers held, which every keyboard's keys changed and a keyboard's close cleared whole. A keyboard that sent a key and went, as a driver's restart makes it, let go the Control and Alt another keyboard held, so the Delete pressed next on that keyboard was sent to a window and was not the secure attention key. lib/keymap.c records the modifier keys held for each keyboard, by the number its caller gives it: the place of its endpoint among the INPUT_DEVICES_MAX a client reads, as a button's source is. A modifier is held while any keyboard holds a key of it, so Control on one keyboard still combines with a key of another, and a release or a close lets go that keyboard's keys alone. Caps Lock stays one state. The record of presses sent, and what a window is sent when a keyboard goes, are as they were. display.md D19's rule 6 and its notes give the rule, with the flat set and a set for each keyboard that does not combine as not taken, and D12 and console.md C3 point to it. The notes record what a modifier key held on two keyboards costs: the window is sent the first release, which says the modifier is still held, and not the second. tools/check-keyroute.c and tools/check-text.c give each event a keyboard: tables of two to four keyboards, sessions of one to four, and a law read back from a session's log, that the modifiers a window is sent are those any keyboard holds. A table's steps for a keyboard's going and a window's are now marked by a value no event has. They were marked by a code, and the keyboard's was 0xFFFF, which two tables also press as a key, so those presses ran as goings.
aoinoikaz
force-pushed
the
keys-modifiers-per-keyboard
branch
from
November 12, 2026 16:44
1d80cfa to
52de68c
Compare
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.
The compositor and the console keep one flat set of the modifiers held, which a keyboard's close clears whole. A keyboard that sends a key and goes, as a driver's restart makes it, lets go the Control and Alt another keyboard holds, so the Delete pressed next on that keyboard is sent to a window and is not the secure attention key.
lib/keymap.crecords the modifier keys held for each keyboard, numbered by its endpoint's place among theINPUT_DEVICES_MAXa client reads. A modifier is held while any keyboard holds a key of it, so Control on one keyboard still combines with a key of another, and a release or a close lets go that keyboard's keys alone. Caps Lock stays one state. display.md D19's rule 6 gives the rule, with the flat set and a set for each keyboard that does not combine as not taken.Checked:
tools/check-keyroute.c, 18,115,551 checks with one to four keyboards, andtools/check-text.c; both fail against a going that clears every keyboard; the default, fallback and window boots under TCG; 73 of 73 files againstSHA256SUMS.Not checked: two keyboards in a guest. The boots have one, so the compositor's and the console's calls at a keyboard's close are read and not run.
Based on #129, which this follows.
Closes #107