1
0
Fork 0

Normalise Unicode keycodes (#18898)

* `UC_MOD`/`UC_RMOD` -> `UC_NEXT`/`UC_PREV`

* `UNICODE_MODE_*` -> `QK_UNICODE_MODE_*`

* `UC_MAC` -> `UNICODE_MODE_MACOS`

* `UC_LNX` -> `UNICODE_MODE_LINUX`

* `UC_WIN` -> `UNICODE_MODE_WINDOWS`

* `UC_BSD` -> `UNICODE_MODE_BSD`

* `UC_WINC` -> `UNICODE_MODE_WINCOMPOSE`

* `UC_EMACS` -> `UNICODE_MODE_EMACS`

* `UC__COUNT` -> `UNICODE_MODE_COUNT`

* `UC_M_MA` -> `UC_MAC`

* `UC_M_LN` -> `UC_LINX`

* `UC_M_WI` -> `UC_WIN`

* `UC_M_BS` -> `UC_BSD`

* `UC_M_WC` -> `UC_WINC`

* `UC_M_EM` -> `UC_EMAC`

* Docs

* Update quantum/unicode/unicode.h
This commit is contained in:
Ryan 2022-11-01 08:15:12 +11:00 committed by GitHub
parent 743524df32
commit 5974d989fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
132 changed files with 303 additions and 292 deletions

View file

@ -61,9 +61,9 @@ const rgblight_segment_t PROGMEM _huh_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNE
#define UNICODE_OFFSET 12
const rgblight_segment_t PROGMEM _uc_mac_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_PURPLE));
// No indicator for UC_LNX
// UC_WIN disabled in config.h
// UC_BSD not implemented
// No indicator for UNICODE_MODE_LINUX
// UNICODE_MODE_WINDOWS disabled in config.h
// UNICODE_MODE_BSD not implemented
const rgblight_segment_t PROGMEM _uc_winc_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_CYAN));
const rgblight_segment_t PROGMEM _uc_emacs_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_GREEN));
@ -85,14 +85,14 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = {
[ACK_OFFSET + ACK_MEH] = _meh_layer,
[ACK_OFFSET + ACK_HUH] = _huh_layer,
[UNICODE_OFFSET + UC_MAC] = _uc_mac_layer,
[UNICODE_OFFSET + UC_LNX] = _none,
[UNICODE_OFFSET + UC_WIN] = _none,
[UNICODE_OFFSET + UC_BSD] = _none,
[UNICODE_OFFSET + UC_WINC] = _uc_winc_layer,
[UNICODE_OFFSET + UC_EMACS] = _uc_emacs_layer,
[UNICODE_OFFSET + UNICODE_MODE_MACOS] = _uc_mac_layer,
[UNICODE_OFFSET + UNICODE_MODE_LINUX] = _none,
[UNICODE_OFFSET + UNICODE_MODE_WINDOWS] = _none,
[UNICODE_OFFSET + UNICODE_MODE_BSD] = _none,
[UNICODE_OFFSET + UNICODE_MODE_WINCOMPOSE] = _uc_winc_layer,
[UNICODE_OFFSET + UNICODE_MODE_EMACS] = _uc_emacs_layer,
[UNICODE_OFFSET + UC__COUNT] = NULL
[UNICODE_OFFSET + UNICODE_MODE_COUNT] = NULL
};
// clang-format on
@ -113,7 +113,7 @@ void do_rgb_layers(layer_state_t state, uint8_t start, uint8_t end) {
}
void do_rgb_unicode(uint8_t uc_mode) {
for (uint8_t i = 0; i < UC__COUNT; i++) {
for (uint8_t i = 0; i < UNICODE_MODE_COUNT; i++) {
bool is_on = i == uc_mode;
rgblight_set_layer_state(UNICODE_OFFSET + i, is_on);
}