diff options
author | Drashna Jaelre <drashna@live.com> | 2018-12-19 08:39:24 -0800 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2018-12-19 08:39:24 -0800 |
commit | fdeec296369c0995bad1117e50946b2df84f35e4 (patch) | |
tree | c20ca5d0e302b189298d37b3abb97c4f37f5b606 /quantum/quantum_keycodes.h | |
parent | 40bf3a2ce9ec781cc2ff7218f909ffdbece44e97 (diff) | |
download | qmk_firmware-fdeec296369c0995bad1117e50946b2df84f35e4.tar.gz qmk_firmware-fdeec296369c0995bad1117e50946b2df84f35e4.zip |
Overhaul Unicode Common functionality (#4325)
* Standardize the Unicode EEPROM code
* Remove unicode init from process_record_* functions
* Add unicode init to where it belongs: matrix_init_quantum
* Move Unicode proccessing to unicode common
* Add audio feedback to input mode keys to drive konstantin up a wall
* Tap_code cleanup
* Update keycodes
* Update unicode documentation
* Update unicode keycodes for consistency/easier merge
* Add Audio Feedback section
* Remove Functions from feature page
And link to the file instead. Link to specific lines later on.
* Fix spacing
Co-Authored-By: drashna <drashna@live.com>
* Because I missed it!
Co-Authored-By: drashna <drashna@live.com>
* Fix spacing
Co-Authored-By: drashna <drashna@live.com>
* SPAAAAAAAAAACing
Co-Authored-By: drashna <drashna@live.com>
* Add BSD for future compatibility
* Thought I fixed that!
Co-Authored-By: drashna <drashna@live.com>
* non-breaking
Co-Authored-By: drashna <drashna@live.com>
* Considered that
Co-Authored-By: drashna <drashna@live.com>
* Yuuup
Co-Authored-By: drashna <drashna@live.com>
* consistency
Co-Authored-By: drashna <drashna@live.com>
* white spaces .... copied from elsewhere
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* Update keycode defines
* Fix Linux Song
* Update all of the songs
* Cleanup
* Move and update check to ensure only one unicode method is enabled
* Update quantum/quantum_keycodes.h
* Update documentation
* Wordsmithing and cleanup
* Format unicode_common (#13)
* case alignment
* process_record_unicode_common → process_unicode_common
* Move song arrays into function where they're used, align preprocessor directives
* Swap the order of UC_WIN and UC_BSD
* Update Unicode docs
* Reorder Unicode mode stuff to match the order of input mode constants
* Fix capitalization in doc subtitle
* Readd BSD and OSX_RALT songs
* Reword BSD note in docs
* Readd BSD keycode description
* Reword explanation of input on different platforms
* Steal vomindoraan's input mode documentation
Co-Authored-By: vomindoraan (vomindoraan@gmail.com)
* Willingly give Drashna the rest of my Unicode doc improvements
* Wordsmithing
Co-Authored-By: drashna <drashna@live.com>
* remove merge artifacts
* Unicode common cleanup (#17)
* Standardize the Unicode EEPROM code
* Remove unicode init from process_record_* functions
* Add unicode init to where it belongs: matrix_init_quantum
* Move Unicode proccessing to unicode common
* Add audio feedback to input mode keys to drive konstantin up a wall
* Tap_code cleanup
* Update keycodes
* Update unicode documentation
* Update unicode keycodes for consistency/easier merge
* Add Audio Feedback section
* Remove Functions from feature page
And link to the file instead. Link to specific lines later on.
* Fix white spaces
Co-Authored-By: drashna <drashna@live.com>
* Fix spacing
Co-Authored-By: drashna <drashna@live.com>
* Because I missed it!
Co-Authored-By: drashna <drashna@live.com>
* Fix spacing
Co-Authored-By: drashna <drashna@live.com>
* SPAAAAAAAAAACing
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* Add BSD for future compatibility
* Thought I fixed that!
Co-Authored-By: drashna <drashna@live.com>
* non-breaking
Co-Authored-By: drashna <drashna@live.com>
* Considered that
Co-Authored-By: drashna <drashna@live.com>
* Yuuup
Co-Authored-By: drashna <drashna@live.com>
* consistency
Co-Authored-By: drashna <drashna@live.com>
* white spaces .... copied from elsewhere
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* Update keycode defines
* Fix Linux Song
* Update all of the songs
* Cleanup
* Move and update check to ensure only one unicode method is enabled
* Update quantum/quantum_keycodes.h
* Update documentation
* Wordsmithing and cleanup
* Format unicode_common (#13)
* case alignment
* process_record_unicode_common → process_unicode_common
* Move song arrays into function where they're used, align preprocessor directives
* Swap the order of UC_WIN and UC_BSD
* Update Unicode docs
* Reorder Unicode mode stuff to match the order of input mode constants
* Fix capitalization in doc subtitle
* Readd BSD and OSX_RALT songs
* Reword BSD note in docs
* Readd BSD keycode description
* Reword explanation of input on different platforms
* Steal vomindoraan's input mode documentation
Co-Authored-By: vomindoraan (vomindoraan@gmail.com)
* Willingly give Drashna the rest of my Unicode doc improvements
* Wordsmithing
Co-Authored-By: drashna <drashna@live.com>
* Rearrange process_unicode_common functions
* Make Unicode input mode constants (UC_*) an enum
* Simplify unicode_input_start/finish code
* Make the key used for WinCompose configurable
* Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY
* Update Unicode input mode doc
* Add descriptions and rearrange definitions in process_unicode_common.h
* Add registry command to Unicode docs + misc updates
* Reword an explanation in Unicode docs
* Add TODO comment
* Remove trailing whitespace
* Improve Cycling documentation
* Add Unicode Input method Cycling support (#19)
* Standardize the Unicode EEPROM code
* Remove unicode init from process_record_* functions
* Add unicode init to where it belongs: matrix_init_quantum
* Move Unicode proccessing to unicode common
* Add audio feedback to input mode keys to drive konstantin up a wall
* Tap_code cleanup
* Update keycodes
* Update unicode documentation
* Update unicode keycodes for consistency/easier merge
* Add Audio Feedback section
* Remove Functions from feature page
And link to the file instead. Link to specific lines later on.
* Fix white spaces
Co-Authored-By: drashna <drashna@live.com>
* Fix spacing
Co-Authored-By: drashna <drashna@live.com>
* Because I missed it!
Co-Authored-By: drashna <drashna@live.com>
* Fix spacing
Co-Authored-By: drashna <drashna@live.com>
* SPAAAAAAAAAACing
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* Add BSD for future compatibility
* Thought I fixed that!
Co-Authored-By: drashna <drashna@live.com>
* non-breaking
Co-Authored-By: drashna <drashna@live.com>
* Considered that
Co-Authored-By: drashna <drashna@live.com>
* Yuuup
Co-Authored-By: drashna <drashna@live.com>
* consistency
Co-Authored-By: drashna <drashna@live.com>
* white spaces .... copied from elsewhere
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* white spaces
Co-Authored-By: drashna <drashna@live.com>
* Update keycode defines
* Fix Linux Song
* Update all of the songs
* Cleanup
* Move and update check to ensure only one unicode method is enabled
* Update quantum/quantum_keycodes.h
* Update documentation
* Wordsmithing and cleanup
* Format unicode_common (#13)
* case alignment
* process_record_unicode_common → process_unicode_common
* Move song arrays into function where they're used, align preprocessor directives
* Swap the order of UC_WIN and UC_BSD
* Update Unicode docs
* Reorder Unicode mode stuff to match the order of input mode constants
* Fix capitalization in doc subtitle
* Readd BSD and OSX_RALT songs
* Reword BSD note in docs
* Readd BSD keycode description
* Reword explanation of input on different platforms
* Steal vomindoraan's input mode documentation
Co-Authored-By: vomindoraan (vomindoraan@gmail.com)
* Willingly give Drashna the rest of my Unicode doc improvements
* Wordsmithing
Co-Authored-By: drashna <drashna@live.com>
* Rearrange process_unicode_common functions
* Make Unicode input mode constants (UC_*) an enum
* Simplify unicode_input_start/finish code
* Make the key used for WinCompose configurable
* Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY
* Update Unicode input mode doc
* Add descriptions and rearrange definitions in process_unicode_common.h
* Add registry command to Unicode docs + misc updates
* Reword an explanation in Unicode docs
* Add TODO comment
* Add cycle_unicode_input_mode and UNICODE_SELECTED_MODES macro
* Add an option for making cycle changes persistent
* Add debug prints to functions that change input_mode
* Use cycle_unicode_input_mode in whitefox/konstantin
* Add persist_unicode_input_mode function
* Add offset to cycle to allow stepping in reverse
* Add keycodes: UNICODE_MODE_FORWARD, UNICODE_MODE_REVERSE
Aliases: UC_MOD, UC_RMOD (respectively)
* REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts
* Fix wrong constant name
* Revert "REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts"
This reverts commit 42676bf251fc8e3823f5e614dad6e510ba47a2f3.
* Change dprintf text
* Give selected modes priority over EEPROM when !UNICODE_CYCLE_PERSIST
* Remove trailing whitespace
* Cleanup of RALT code and unicode compilation stuff
* Remove else for unicode handling
Diffstat (limited to 'quantum/quantum_keycodes.h')
-rw-r--r-- | quantum/quantum_keycodes.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 283b4a65c..2b309f4d5 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
@@ -81,9 +81,6 @@ enum quantum_keycodes { | |||
81 | #endif | 81 | #endif |
82 | QK_MOD_TAP = 0x6000, | 82 | QK_MOD_TAP = 0x6000, |
83 | QK_MOD_TAP_MAX = 0x7FFF, | 83 | QK_MOD_TAP_MAX = 0x7FFF, |
84 | #if defined(UNICODEMAP_ENABLE) && defined(UNICODE_ENABLE) | ||
85 | #error "Cannot enable both UNICODEMAP && UNICODE" | ||
86 | #endif | ||
87 | #ifdef UNICODE_ENABLE | 84 | #ifdef UNICODE_ENABLE |
88 | QK_UNICODE = 0x8000, | 85 | QK_UNICODE = 0x8000, |
89 | QK_UNICODE_MAX = 0xFFFF, | 86 | QK_UNICODE_MAX = 0xFFFF, |
@@ -456,6 +453,15 @@ enum quantum_keycodes { | |||
456 | 453 | ||
457 | EEPROM_RESET, | 454 | EEPROM_RESET, |
458 | 455 | ||
456 | UNICODE_MODE_FORWARD, | ||
457 | UNICODE_MODE_REVERSE, | ||
458 | |||
459 | UNICODE_MODE_OSX, | ||
460 | UNICODE_MODE_LNX, | ||
461 | UNICODE_MODE_WIN, | ||
462 | UNICODE_MODE_BSD, | ||
463 | UNICODE_MODE_WINC, | ||
464 | |||
459 | // always leave at the end | 465 | // always leave at the end |
460 | SAFE_RANGE | 466 | SAFE_RANGE |
461 | }; | 467 | }; |
@@ -684,6 +690,15 @@ enum quantum_keycodes { | |||
684 | #define X(n) (QK_UNICODE_MAP | (n)) | 690 | #define X(n) (QK_UNICODE_MAP | (n)) |
685 | #endif | 691 | #endif |
686 | 692 | ||
693 | #define UC_MOD UNICODE_MODE_FORWARD | ||
694 | #define UC_RMOD UNICODE_MODE_REVERSE | ||
695 | |||
696 | #define UC_M_OS UNICODE_MODE_OSX | ||
697 | #define UC_M_LN UNICODE_MODE_LNX | ||
698 | #define UC_M_WI UNICODE_MODE_WIN | ||
699 | #define UC_M_BS UNICODE_MODE_BSD | ||
700 | #define UC_M_WC UNICODE_MODE_WINC | ||
701 | |||
687 | #ifdef SWAP_HANDS_ENABLE | 702 | #ifdef SWAP_HANDS_ENABLE |
688 | #define SH_T(kc) (QK_SWAP_HANDS | (kc)) | 703 | #define SH_T(kc) (QK_SWAP_HANDS | (kc)) |
689 | #define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) | 704 | #define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) |