Skip to content
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

Move more unicode ranges to DD #19755

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion data/constants/keycodes/keycodes_0.0.2.hjson
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{}
{
"ranges": {
"0x8000/0X3FFF": {
"define": "QK_UNICODEMAP"
},
"0xC000/0X3FFF": {
"define": "QK_UNICODEMAP_PAIR"
}
}
}
6 changes: 6 additions & 0 deletions quantum/keycodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ enum qk_keycode_ranges {
QK_USER_MAX = 0x7FFF,
QK_UNICODE = 0x8000,
QK_UNICODE_MAX = 0xFFFF,
QK_UNICODEMAP = 0x8000,
QK_UNICODEMAP_MAX = 0xBFFF,
QK_UNICODEMAP_PAIR = 0xC000,
QK_UNICODEMAP_PAIR_MAX = 0xFFFF,
};

enum qk_keycode_defines {
Expand Down Expand Up @@ -1308,6 +1312,8 @@ enum qk_keycode_defines {
#define IS_QK_KB(code) ((code) >= QK_KB && (code) <= QK_KB_MAX)
#define IS_QK_USER(code) ((code) >= QK_USER && (code) <= QK_USER_MAX)
#define IS_QK_UNICODE(code) ((code) >= QK_UNICODE && (code) <= QK_UNICODE_MAX)
#define IS_QK_UNICODEMAP(code) ((code) >= QK_UNICODEMAP && (code) <= QK_UNICODEMAP_MAX)
#define IS_QK_UNICODEMAP_PAIR(code) ((code) >= QK_UNICODEMAP_PAIR && (code) <= QK_UNICODEMAP_PAIR_MAX)

// Group Helpers
#define IS_INTERNAL_KEYCODE(code) ((code) >= KC_NO && (code) <= KC_TRANSPARENT)
Expand Down
4 changes: 0 additions & 4 deletions quantum/quantum_keycodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
#define QK_RSFT 0x1200
#define QK_RALT 0x1400
#define QK_RGUI 0x1800
#define QK_UNICODEMAP 0x8000
#define QK_UNICODEMAP_MAX 0xBFFF
#define QK_UNICODEMAP_PAIR 0xC000
#define QK_UNICODEMAP_PAIR_MAX 0xFFFF
// clang-format on

// Generic decoding for the whole QK_MODS range
Expand Down