-
-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] allow unicode_map to support more than 128 characters #24998
Comments
The index type is a uint8_t, so that should allow up to 256 characters, unless I'm missing something. |
documentation is clear Due to keycode size constraints, i and j can each only refer to one of the first 128 characters in your unicode_map. In other words, 0 ≤ i ≤ 127 and 0 ≤ j ≤ 127.
there is also a macro in the code that i fail to find now... that makes clear the restriction |
here it is qmk_firmware/quantum/quantum_keycodes.h Line 189 in a70288b
|
I see. |
It occurred to me that as a local change (i.e. hack), you could get more pair code space by redefining the size of the UM space to be zero, and then use all of the 8000 to FFFF index space for the pairs, This gives 15 bits instead of the current 14, and then you can get essentially 7.5 bits for i and j, giving 181 easily-defined unicode characters instead of the current 128 using some simple arithmetic instead of the shifts and masks. The main change would be then something like this:
These definitions in keycodes.h would need to be changed too:
These become:
This will hurt performance a tiny bit, due to the need for the divide and mod operators, but shouldn't be horrible. Of course if you need more than 181 unicode characters, this won't work for you either. |
that will be enough for me. I will test and report. thank you for your time! |
Let me know if you have problems with it. I haven't tried this.. just looked at the code. |
I fixed mismatched parens in the UP() definition. |
I can confirm that now is working... in the sense I have all my UC correctly displayed. |
Great! Good to hear. |
Feature Request Type
Description
at the moment unicode_map supports ony 128 characters... looks a lot but one can easily overun as it happened to me.
The text was updated successfully, but these errors were encountered: