I have setup my QMK
-enabled keyboard to output Unicode characters. In short, that was adding UNICODE_ENABLE = yes
line to the rules.mk
file and adding the following two lines to the config.h
file.
#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC
#define UNICODE_CYCLE_PERSIST false
And afterward adding (for example) UC(0x2227)
and UC(0x2228)
to keymap.c
file in order to be able to type ∧
and ∨
characters. Now, this works fine in most GUI applications like web browsers, etc, it also works in Terminal (GUI). However in Emacs instead of ∧
and ∨
I get 2227 or 2228 SPC
characters inserted in a buffer :(
I have tried setting (set-keyboard-coding-system 'utf-8)
without any effect.
Switching to other Unicode insertion modes from my default UC_LNX
, which gives the above behavior, results in:
- for
UC_OSX
: same as pressing-and-holding Ctrl key and hitting digits (2227
); - for
UC_WIN
: same as above with extra screen "blink"; - for
UC_WINC
: only raw stringu2227
gets directly inserted in the buffer.
The behavior for UC_LNX
seems to be explained by Emacs interpreting the Unicode insertion as the following key-sequence: C-2
C-2
C-2
C-7
SPC
, thus inserting 2227 space characters... :/
I am using GUI version of GNU Emacs running on CentOS 7 with GNOME Shell 3.28.3.
Has anybody any idea on how to get Emacs to correctly interpret the Unicode characters inserted directly from keyboard OR how to augment QMK software with Unicode insertion method that Emacs will understand UC_EMACS
?