Derive shifted keycode labels from active layout - #396
Open
ReeViiS69 wants to merge 1 commit into
Open
Conversation
Make shifted keycode labels in the keycode picker reflect the currently selected keyboard layout. Shifted aliases without an explicit layout override are normalized to their underlying basic keycode and use the shifted display row from the active layout. Existing explicit shifted-keycode overrides remain unchanged and take priority. This only affects the visual label and highlight state. The underlying QMK keycode, assignment behavior, protocol, and firmware behavior remain unchanged. Added regression coverage for default QWERTY, German derived labels, Slovak explicit overrides, Japanese empty shifted states, and preservation of the underlying keycode.
Author
|
#398 |
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.
Shifted keycode labels in the keycode picker now reflect the currently selected keyboard layout.
For shifted aliases without an explicit layout override, the underlying basic keycode is derived using the existing keycode normalization and its shifted label is taken from the active layout. Existing explicit overrides remain unchanged and take precedence.
This only affects the visual representation; the underlying QMK keycodes and assignment behavior are unchanged.
Tests were added for default QWERTY behavior, German derived labels, Slovak explicit overrides, Japanese empty shifted states, and preservation of the underlying keycode.
It may be good followup on this pr and cleanup the overrides that are not nessesary for layout purpose. i think its better to not hardcode duplicates. but for now mostly german qwertz profits from this.