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

Allow easy switching/cycling between Unicode input modes #4221

Closed
wants to merge 114 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
18fcde1
Standardize the Unicode EEPROM code
drashna Nov 2, 2018
7b6391b
Remove unicode init from process_record_* functions
drashna Nov 2, 2018
a6e66f0
Add unicode init to where it belongs: matrix_init_quantum
drashna Nov 2, 2018
9698e3f
Move Unicode proccessing to unicode common
drashna Nov 2, 2018
59bf691
Add audio feedback to input mode keys to drive konstantin up a wall
drashna Nov 2, 2018
be2c6e7
Tap_code cleanup
drashna Nov 2, 2018
5015c2b
Update keycodes
drashna Nov 2, 2018
8087acd
Update unicode documentation
drashna Nov 2, 2018
08bab87
Update unicode keycodes for consistency/easier merge
drashna Nov 2, 2018
1e3c0a9
Add Audio Feedback section
drashna Nov 2, 2018
e7aee81
Remove Functions from feature page
drashna Nov 2, 2018
44c238f
Fix white spaces
vomindoraan Nov 2, 2018
bf79667
Fix spacing
vomindoraan Nov 2, 2018
122fbac
Because I missed it!
vomindoraan Nov 2, 2018
cfa4163
Fix spacing
vomindoraan Nov 2, 2018
8d0954b
SPAAAAAAAAAACing
vomindoraan Nov 2, 2018
427a38f
white spaces
vomindoraan Nov 2, 2018
e5da49c
Add BSD for future compatibility
drashna Nov 2, 2018
4b2a0bc
Thought I fixed that!
vomindoraan Nov 2, 2018
9538567
non-breaking
vomindoraan Nov 2, 2018
68d1d5d
Considered that
vomindoraan Nov 2, 2018
d4b8811
Yuuup
vomindoraan Nov 2, 2018
df4f58e
consistency
vomindoraan Nov 2, 2018
eca3a41
white spaces .... copied from elsewhere
vomindoraan Nov 2, 2018
eaa5efc
white spaces
vomindoraan Nov 2, 2018
4860a8c
white spaces
vomindoraan Nov 2, 2018
afad387
Update keycode defines
drashna Nov 2, 2018
0d64e65
Fix Linux Song
drashna Nov 2, 2018
6840d80
Update all of the songs
drashna Nov 2, 2018
0b403a4
Cleanup
drashna Nov 2, 2018
c0cd867
Move and update check to ensure only one unicode method is enabled
drashna Nov 2, 2018
b053a75
Update quantum/quantum_keycodes.h
drashna Nov 2, 2018
455c143
Update documentation
drashna Nov 2, 2018
7b729ed
Wordsmithing and cleanup
drashna Nov 3, 2018
919c90e
Format unicode_common (#13)
vomindoraan Nov 3, 2018
96fd5e9
Steal vomindoraan's input mode documentation
drashna Nov 3, 2018
4c63b3b
Willingly give Drashna the rest of my Unicode doc improvements
vomindoraan Nov 3, 2018
36fce29
Wordsmithing
vomindoraan Nov 3, 2018
f002064
Rearrange process_unicode_common functions
vomindoraan Oct 22, 2018
dabe0c1
Simplify unicode_input_start/finish code
vomindoraan Oct 23, 2018
a5b9d40
Make Unicode input mode constants (UC_*) an enum
vomindoraan Sep 18, 2018
93b15db
Make the key used for WinCompose configurable
vomindoraan Oct 23, 2018
f47d654
Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY
vomindoraan Oct 23, 2018
7e84383
Update Unicode input mode doc
Oct 23, 2018
b92c115
Add descriptions and rearrange definitions in process_unicode_common.h
Oct 23, 2018
120ccd1
Add registry command to Unicode docs + misc updates
Oct 23, 2018
1e7ab5e
Reword an explanation in Unicode docs
vomindoraan Nov 2, 2018
ac2183e
Add TODO comment
Nov 5, 2018
b01d34e
Add cycle_unicode_input_mode and UNICODE_SELECTED_MODES macro
Oct 23, 2018
5d771ca
Add an option for making cycle changes persistent
Oct 23, 2018
32c93bf
Add debug prints to functions that change input_mode
Oct 23, 2018
d9d4255
Use cycle_unicode_input_mode in whitefox/konstantin
Oct 23, 2018
4b4fb74
Add persist_unicode_input_mode function
vomindoraan Oct 31, 2018
bd68cfe
Merge remote-tracking branch 'drashna/make_unicode_init' into cycle_u…
Nov 5, 2018
1a19eb7
Add offset to cycle to allow stepping in reverse
Nov 5, 2018
f4ded78
Add keycodes: UNICODE_MODE_FORWARD, UNICODE_MODE_REVERSE
Nov 5, 2018
42676bf
REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts
Nov 5, 2018
a0febf5
Fix wrong constant name
Nov 5, 2018
18830a8
Merge branch 'master' into make_unicode_init
drashna Nov 6, 2018
2b92aaa
Merge remote-tracking branch 'drashna/make_unicode_init' into unicode…
Nov 5, 2018
6f9a581
Merge remote-tracking branch 'drashna/make_unicode_init' into unicode…
vomindoraan Nov 6, 2018
30a8524
Merge remote-tracking branch 'drashna/make_unicode_init' into cycle_u…
vomindoraan Nov 6, 2018
29b52e5
Revert "REVERT ME: Undo changes to whitefox/konstantin to avoid confl…
Nov 6, 2018
8cb97d4
Merge branch 'unicode_common_cleanup' into unicode_merge
Nov 6, 2018
6b4470d
Change dprintf text
Nov 6, 2018
7a466fb
Merge branch 'cycle_unicode_input_mode_new' into unicode_merge
Nov 6, 2018
6d39eda
Give selected modes priority over EEPROM when !UNICODE_CYCLE_PERSIST
Nov 6, 2018
8dfbb0b
Merge branch 'cycle_unicode_input_mode_new' into unicode_merge
Nov 6, 2018
e5892a7
Standardize the Unicode EEPROM code
drashna Nov 2, 2018
b1022d2
Remove unicode init from process_record_* functions
drashna Nov 2, 2018
201e244
Add unicode init to where it belongs: matrix_init_quantum
drashna Nov 2, 2018
4d746e0
Move Unicode proccessing to unicode common
drashna Nov 2, 2018
df3fd01
Add audio feedback to input mode keys to drive konstantin up a wall
drashna Nov 2, 2018
207a886
Tap_code cleanup
drashna Nov 2, 2018
63ad7af
Update keycodes
drashna Nov 2, 2018
baaabd5
Update unicode documentation
drashna Nov 2, 2018
1f2ee0b
Update unicode keycodes for consistency/easier merge
drashna Nov 2, 2018
602ef66
Add Audio Feedback section
drashna Nov 2, 2018
9f9e4e5
Remove Functions from feature page
drashna Nov 2, 2018
ed472ee
Fix white spaces
vomindoraan Nov 2, 2018
69a5bb6
Fix spacing
vomindoraan Nov 2, 2018
2d7bfae
Because I missed it!
vomindoraan Nov 2, 2018
168d73a
Fix spacing
vomindoraan Nov 2, 2018
be055a0
SPAAAAAAAAAACing
vomindoraan Nov 2, 2018
120a057
Add BSD for future compatibility
drashna Nov 2, 2018
0a13b30
Thought I fixed that!
vomindoraan Nov 2, 2018
8a57196
non-breaking
vomindoraan Nov 2, 2018
0e29431
Considered that
vomindoraan Nov 2, 2018
4b93ba8
Yuuup
vomindoraan Nov 2, 2018
4b15546
consistency
vomindoraan Nov 2, 2018
5a4d99d
white spaces .... copied from elsewhere
vomindoraan Nov 2, 2018
55174db
white spaces
vomindoraan Nov 2, 2018
97ac533
white spaces
vomindoraan Nov 2, 2018
01451ce
Update keycode defines
drashna Nov 2, 2018
66d1a8f
Fix Linux Song
drashna Nov 2, 2018
d0b0e37
Update all of the songs
drashna Nov 2, 2018
218745f
Cleanup
drashna Nov 2, 2018
7979442
Move and update check to ensure only one unicode method is enabled
drashna Nov 2, 2018
2044215
Update quantum/quantum_keycodes.h
drashna Nov 2, 2018
0d3f980
Update documentation
drashna Nov 2, 2018
b15fa4a
Wordsmithing and cleanup
drashna Nov 3, 2018
9b14dfd
Format unicode_common (#13)
vomindoraan Nov 3, 2018
0b0cfc2
Steal vomindoraan's input mode documentation
drashna Nov 3, 2018
e402234
Willingly give Drashna the rest of my Unicode doc improvements
vomindoraan Nov 3, 2018
0f006dc
Wordsmithing
vomindoraan Nov 3, 2018
6258f06
Remove trailing whitespace
vomindoraan Nov 16, 2018
4bd0728
Merge branch 'master' into cycle_unicode_input_mode_new
vomindoraan Nov 16, 2018
c6cc3f9
Merge branch 'master' into make_unicode_init
drashna Nov 25, 2018
de4dc0f
remove merge artifacts
drashna Nov 25, 2018
da4dee2
Unicode common cleanup (#17)
drashna Nov 25, 2018
bc66f62
Merge branch 'make_unicode_init' into cycle_unicode_input_mode_new
drashna Nov 25, 2018
7bad8ca
Improve Cycling documentation
drashna Nov 25, 2018
232ac75
Merge branch 'unicode_merge' into cycle_unicode_input_mode_new
vomindoraan Nov 25, 2018
ff0d39f
Merge remote-tracking branch 'drashna/make_unicode_init' into cycle_u…
vomindoraan Nov 25, 2018
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
133 changes: 97 additions & 36 deletions docs/feature_unicode.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Unicode Support

There are three Unicode keymap definition method available in QMK:
There are three Unicode keymap definition methods available in QMK:

## UNICODE_ENABLE

Supports Unicode input up to 0xFFFF. The keycode function is `UC(n)` in keymap file, where *n* is a 4 digit hexadecimal.
Supports Unicode up to `0xFFFF`. The keycode function is `UC(n)` in the keymap file, where _n_ is a 4 digit hexadecimal number.

## UNICODEMAP_ENABLE

Supports Unicode up to 0xFFFFFFFF. You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)` where *n* is the array index of the mapping table.
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)`, where _n_ is an array index into the mapping table.

And you may want to have an enum to make reference easier. So you'd want to add something like this to your keymap:

```c
enum unicode_name {
BANG, // ‽
IRONY, // ⸮
SNEK // snke 🐍
enum unicode_names {
BANG,
IRONY,
SNEK,
};

const uint32_t PROGMEM unicode_map[] = {
[BANG] = 0x0203D, // ‽
[IRONY] = 0x02E2E, // ⸮
[SNEK] = 0x1F40D // snke 🐍
[BANG] = 0x203D, // ‽
[IRONY] = 0x2E2E, // ⸮
[SNEK] = 0x1F40D, // 🐍
}:
```

Make sure that the order for both matches.

## UCIS_ENABLE

Supports Unicode up to 0xFFFFFFFF. As with `UNICODE_MAP`, you may want to main a mapping table in your keymap file. However, there is no keycodes for this feature, you will have to add a keycode or function to call `qk_ucis_start()`. Once you've run that, you can just type the text for your unicode, and then hit space or enter to complete it, or ESC to cancel it. And if it matches an entry in your table, it will automatically "backspace" the trigger word (from your table) and then will input the unicode sequence.
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you may want to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this featureyou will have to add a keycode or function that calls `qk_ucis_start()`. Once it's been called, you can type the mnemonic for your character, then hit Space or Enter to complete it or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode sequence inserted.

For instance, you would need to have a table like this in your keymap:

Expand All @@ -53,42 +53,103 @@ There are several functions that you can add to your keymap to customize the fun
* `void qk_ucis_success(uint8_t symbol_index)` - This runs when the unicode input has matched something, and has completed. Default doesn't do anything.
* `void qk_ucis_symbol_fallback (void)` - This runs if the input text doesn't match anything. The default function falls back to trying that input as a unicode code.

The default code for these are:
You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c).

## Input Modes

Unicode input in QMK works by inputting a sequence of characters to the OS, sort of like a macro. Unfortunately, the way this is done differs for each platform. Specifically, each platform requires a different combination of keys to trigger Unicode input. Therefore, a corresponding input mode has to be set in QMK.

The following input modes are available:

* **`UC_OSX`**: Mac OS X built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).

To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.

* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports all possible code points (`0x10FFFF`).

Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.

* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.

To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Afterwards, reboot.
This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead.

* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).

* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF`.

To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app.
By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode.

### Switching Input Modes

There are two ways to set the input mode for Unicode: by keycode or by function. Keep in mind that both methods write to persistent storage (EEPROM), and are loaded each time the keyboard starts. So once you've set it the first time, you don't need to set it again unless you want to change it, or you've reset the EEPROM settings.

You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap.

|Keycode |Alias |Input mode |Description |
|-----------------------|---------|-------------|-----------------------------------------|
|`UNICODE_MODE_FORWARD` |`UC_MOD` | |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
|`UNICODE_MODE_REVERSE` |`UC_RMOD`| |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to Mac OS X input. |
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input. |
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input. |
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented). |
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose.|

You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user` (or a similar function). For example:

```c
void qk_ucis_start_user(void) { // outputs keyboard emoji
unicode_input_start();
register_hex(0x2328);
unicode_input_finish();
void eeconfig_init_user(void) {
set_unicode_input_mode(UC_LNX);
}
```

void qk_ucis_success(uint8_t symbol_index) {
}
### Audio Feedback

void qk_ucis_symbol_fallback (void) { // falls back to manual unicode entry
for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
uint8_t code = qk_ucis_state.codes[i];
register_code(code);
unregister_code(code);
wait_ms(UNICODE_TYPE_DELAY);
}
}
If you have the [Audio feature](feature_audio.md) enabled on the board, you can set melodies to be played when you press the above keys. That way you can have some audio feedback when switching input modes.

For instance, you can add these definitions to your `config.h` file:

```c
#define UNICODE_SONG_OSX COIN_SOUND
#define UNICODE_SONG_LNX UNICODE_LINUX
#define UNICODE_SONG_BSD MARIO_GAMEOVER
#define UNICODE_SONG_WIN UNICODE_WINDOWS
#define UNICODE_SONG_WINC UNICODE_WINDOWS
```

## Unicode Input methods
### Additional Customization

Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system.

#### Start and Finish input functions

The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input.

* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on Mac.
* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key.

Unicode input in QMK works by inputting a sequence of characters to the OS,
sort of like macro. Unfortunately, each OS has different ideas on how Unicode is input.
You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c).

This is the current list of Unicode input method in QMK:

* __UC_OSX__: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
* __UC_OSX_RALT__: Same as UC_OSX, but sends the Right Alt key for unicode input
* __UC_LNX__: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
* __UC_WIN__: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
* __UC_WINC__: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
#### Input Key Configuration

At some point, you need to call `set_unicode_input_mode(x)` to set the correct unicode method. This sets the method that is used to send the unicode, and stores it in EEPROM, so you only need to call this once.
Additionally, you can customize the keys used to trigger the unicode input for macOS and WinCompose by adding defines to your `config.h`

```c
#define UNICODE_OSX_KEY KC_LALT
#define UNICODE_WINC_KEY KC_RALT
```

#### Input Method Cycling

Also, you can choose which input methods are availble for cycling through. By default, this is disabled. But if you want to enabled it, then limiting it to just those modes makes sense. Note that `UNICODE_SELECTED_MODES` define is comma delimited.

```c
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_BSD, UC_WINC
```

## `send_unicode_hex_string`

Expand Down
4 changes: 4 additions & 0 deletions keyboards/whitefox/keymaps/konstantin/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
#define PERMISSIVE_HOLD
#define TAPPING_TERM 200
#define TAPPING_TOGGLE 2

#define UNICODE_CYCLE_PERSIST false
#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX
#define UNICODE_WINC_KEY KC_RGUI
8 changes: 2 additions & 6 deletions keyboards/whitefox/keymaps/konstantin/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
#define DIVIDE UC(0x00F7)
#define MINUS UC(0x2212)

void eeconfig_init_user(void) {
set_unicode_input_mode(UC_WINC);
}

enum layers {
L_BASE,
L_FN,
Expand Down Expand Up @@ -162,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
* │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │ │ │Stp│Ply│Prv│Nxt│Clear│Ins│
* │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
* │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
Expand All @@ -173,7 +169,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[L_FN] = LAYOUT_truefox( \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, \
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \
KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \
_______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \
_______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \
Expand Down
2 changes: 0 additions & 2 deletions quantum/process_keycode/process_ucis.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ void register_ucis(const char *hex) {
bool process_ucis (uint16_t keycode, keyrecord_t *record) {
uint8_t i;

unicode_input_mode_init();

if (!qk_ucis_state.in_progress)
return true;

Expand Down
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_ucis.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PROCESS_UCIS_H
#define PROCESS_UCIS_H
#pragma once

#include "quantum.h"
#include "process_unicode_common.h"
Expand Down Expand Up @@ -48,5 +47,3 @@ void qk_ucis_symbol_fallback (void);
void qk_ucis_success(uint8_t symbol_index);
void register_ucis(const char *hex);
bool process_ucis (uint16_t keycode, keyrecord_t *record);

#endif
2 changes: 0 additions & 2 deletions quantum/process_keycode/process_unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
bool process_unicode(uint16_t keycode, keyrecord_t *record) {
if (keycode > QK_UNICODE && record->event.pressed) {
uint16_t unicode = keycode & 0x7FFF;
unicode_input_mode_init();
unicode_input_start();
register_hex(unicode);
unicode_input_finish();
}
return true;
}

5 changes: 1 addition & 4 deletions quantum/process_keycode/process_unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PROCESS_UNICODE_H
#define PROCESS_UNICODE_H
#pragma once

#include "quantum.h"
#include "process_unicode_common.h"

bool process_unicode(uint16_t keycode, keyrecord_t *record);

#endif
Loading