Add Unicode keycode support via UC() and UM() macros#328
Open
nkanellopoulos wants to merge 3 commits intothe-via:mainfrom
Open
Add Unicode keycode support via UC() and UM() macros#328nkanellopoulos wants to merge 3 commits intothe-via:mainfrom
nkanellopoulos wants to merge 3 commits intothe-via:mainfrom
Conversation
Add support for QMK's Unicode keycodes using the UC() macro syntax. Users can now enter Unicode characters through the "Any" keycode modal. Supported formats: - UC(0x00E4) - with 0x prefix - UC(00E4) - without 0x prefix The implementation: - Parses UC(hex) syntax in the custom keycode modal - Validates hex codes are within QMK's supported range (0x0000-0x7FFF) - Converts to QMK Unicode keycode format (0x8000 | codepoint) - Displays keycodes back in UC() format for clarity Example usage: - UC(0x00E4) for ä - UC(0x2764) for ❤ - UC(0x03B1) for α
Add support for QMK's Unicode Map keycodes to access the full Unicode range. Supported formats: - UM(index) - Unicode Map array index (0-16383) Allows access to full Unicode range including emoji - UP(i, j) - Unicode Pair for lowercase/uppercase (0-127 each) Automatically switches based on Shift/Caps Lock state Implementation: - Parse UM(index) syntax and convert to QK_UNICODEMAP format - Parse UP(i,j) syntax and convert to QK_UNICODEMAP_PAIR format - Display keycodes back in their original format for clarity This extends the previous UC() support to cover all QMK Unicode features except UCIS (which requires custom keycode implementation).
- Document UC(), UM(), and UP() keycode usage in VIA - Include firmware configuration requirements - Add examples with emoji and Greek letters - Note that only one Unicode mode can be enabled at a time - Provide OS-specific setup instructions - Include troubleshooting guide
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.
See Unicode.md for the full docs.
Add support for QMK's Unicode keycodes using the UC() macro syntax.
Users can now enter Unicode characters through the
Anykeycode modal.PREREQUISITES:
This has to be enabled in the keyboard's firmware
You can easily add it yourself to the firmware:
In keyboard's config.h:
define UNICODE_SELECTED_MODES UNICODE_MODE_MACOSadjust for your system:
In rules.mk:
UNICODE_ENABLE = yes(the file for my keyboard is: keyboards/lemokey/l3/rules.mk)Note: for this to work on macOS, the Unicode Hex Input source has to be active
Supported formats:
The implementation:
Example usage: