Feature/hid layout tables#69
Open
yajatnarayan wants to merge 1 commit into
Open
Conversation
4d0a32d to
90fa3f1
Compare
Replace the per-layout hid_layouts_type_string_us/_abnt2 switch functions
with data tables and a single generic walker. Each layout is a 128-entry
ASCII table of {keycode, modifier, dead_keycode, dead_modifier} entries,
plus an optional UTF-8 supplemental table for accented characters. Dead
keys (ABNT2 accents, ' and ") are encoded as an optional prefix press.
Dispatch is a single s_layouts[] lookup indexed by ducky_layout_t, so
adding a layout needs no new code path.
Typed output for US and ABNT2 is unchanged. Update the component README
and add a host-side equivalence test under tools/hid_layouts_equiv_test.
90fa3f1 to
ab11d71
Compare
Member
|
Are you sending source files into /tools? I didn't quite understand the reason |
Contributor
Author
|
That's just to keep a copy of the older version just to have a side by side comparison of functionality |
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.
Description
Replace the per-layout type_string_us/_abnt2 switch functions with pure data tables and a single generic walker. Each layout is a 128-entry ASCII table of {keycode, modifier, dead_keycode, dead_modifier} entries plus an optional UTF-8 supplemental table; dead keys (ABNT2 accents, '/") are encoded as an optional prefix press. Dispatch is now a singles_layouts[] lookup indexed by ducky_layout_t, so adding a layout needs no new code path.
Output for US and ABNT2 is unchanged. Update the component README to document the new model and the "register a layout" steps.
Related Issue: Fixes #64
Type of Change
Checklist
Hardware Testing Details
N/A