diff options
author | Drashna Jaelre <drashna@live.com> | 2019-03-05 15:07:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 15:07:13 -0800 |
commit | edef1f93960352bcc97ac75653867e23e3db45fc (patch) | |
tree | 197333e503ff88f68df0ddf93af27899f90e5714 /users/konstantin/unicode.h | |
parent | 2e8e465423a92c97273431f8cf65c7333f2d98e7 (diff) | |
parent | be1d5c66093faa8885855a2d133ef20a408233bd (diff) |
Update personal userspace and keymaps + improve custom functionality (#5289)
* Change how desktop commands work
* Add DST_MOD_MASK as a config option
* DST_RMV → DST_REM
* Add melody96:konstantin keymap
* Update custom SEND_STRING
* Move feature flags from userspace into keyboard rules
* Use "Vo-", "Vo+" instead of "VoD", "VoU" in keymap comments
* Add RGB controls and numpad Unicode to Melody96 keymap
* Add RGB_SET keycode to Melody96 and RGB files to userspace
* Generate UNICODE and UNICODEMAP constants using macros
* Avoid collisions with X_* send string constants
* Use two spaces before inline comments
* Add _keymap versions of other custom Quantum functions
Not added: eeconfig_update_keymap, eeconfig_read_keymap
* Switch to UNICODEMAP in keyboard rules
* Make toggle_numpad a nested function in process_record_user
* Set Melody96 underglow color to Godspeed blue on EEPROM reset
* Remove most _keymap and _user definitions in userspace
Some keyboards misuse _user functions by defining them in the base files
instead of the corresponding _kb functions (especially led_set_user and
matrix_init_user). Until this is fixed (#5148), I've removed definitions
in my userspace that could cause linking collisions.
* Update GODSPEED_BLUE values and RGB mode keys
* Add GODSPEED_YELLOW color
* Set preferred intervals for rgblight effects
* Update tap dance function names
* Replace td_lshift_fn with generic td_mod_layer, add TD_RCTL_FN
Move TD_FN_RCTL after TD_RCTL_FN
* Replace td_fn_rctrl with generic td_layer_mod
* Add blank lines, prefer explicit initialization
* ACTION_TAP_DANCE_DOUBLE_MODS → ACTION_TAP_DANCE_DOUBLE_MOD
* Update Godspeed colors
* Add media controls to Melody96 keymap
* Add SysRq, Break combos and other keys to Melody96 keymap
Diffstat (limited to 'users/konstantin/unicode.h')
-rw-r--r-- | users/konstantin/unicode.h | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index 09af7e1c7f..c8eddabb71 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -2,10 +2,33 @@ #include "quantum.h" -#define COMMA UC(0x002C) -#define L_PAREN UC(0x0028) -#define R_PAREN UC(0x0029) -#define EQUALS UC(0x003D) -#define TIMES UC(0x00D7) -#define DIVIDE UC(0x00F7) -#define MINUS UC(0x2212) +#define FOREACH_UNICODE(M) \ + M(COMMA, 0x002C) \ + M(L_PAREN, 0x0028) \ + M(R_PAREN, 0x0029) \ + M(EQUALS, 0x003D) \ + M(TIMES, 0x00D7) \ + M(DIVIDE, 0x00F7) \ + M(MINUS, 0x2212) + +#define UC_KEYCODE(name, code) name = UC(code), + +#define UCM_NAME(name, code) UCM_ ## name, +#define UCM_ENTRY(name, code) [UCM_ ## name] = code, +#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), + +#if defined(UNICODE_ENABLE) +enum unicode_keycodes { + FOREACH_UNICODE(UC_KEYCODE) +}; +#elif defined(UNICODEMAP_ENABLE) +enum unicode_names { + FOREACH_UNICODE(UCM_NAME) +}; + +extern const uint32_t PROGMEM unicode_map[]; + +enum unicode_keycodes { + FOREACH_UNICODE(UCM_KEYCODE) +}; +#endif |