-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Added emacs as an "operating system" for input mode. #16949
Conversation
Previous implementation, #8358. |
Is there a reason that the "linux" mode can't be used, with a custom start/finish option? Eg void unicode_input_start(void) {
unicode_saved_caps_lock = host_keyboard_led_state().caps_lock;
unicode_saved_num_lock = host_keyboard_led_state().num_lock;
if (unicode_config.input_mode == UC_LNX && unicode_saved_caps_lock) {
tap_code(KC_CAPS_LOCK);
}
unicode_saved_mods = get_mods(); // Save current mods
clear_mods(); // Unregister mods to start from a clean state
switch (unicode_config.input_mode) {
case UC_MAC:
register_code(UNICODE_KEY_MAC);
break;
case UC_LNX:
tap_code16(LCTL(KC_X));
tap_code16(KC_8);
tap_code16(KC_ENTER);
break;
case UC_WIN:
// For increased reliability, use numpad keys for inputting digits
if (!unicode_saved_num_lock) {
tap_code(KC_NUM_LOCK);
}
register_code(KC_LEFT_ALT);
wait_ms(UNICODE_TYPE_DELAY);
tap_code(KC_KP_PLUS);
break;
case UC_WINC:
tap_code(UNICODE_KEY_WINC);
tap_code(KC_U);
break;
}
wait_ms(UNICODE_TYPE_DELAY);
} |
@drashna as far as I am aware, ibus on linux only allows Alt+HEXCODE entries, whereas emacs in general requires the |
(having said that, if you have But we'd probably still want to keep the default ibus settings for normal people |
Credit to user TrentinQuarantino at the emacs stack exchange: https://emacs.stackexchange.com/a/56027
- moved the enum `UNICODE_MODE_EMACS` to just before `SAFE_RANGE` which makes it safe for things like VIA to work with
- moved the enum `UNICODE_MODE_EMACS` to just before `SAFE_RANGE` so that things like VIA can work properly - previous commit was a careless merge from the wrong master branch. This commit fixes that
not use the nonstandard C of using `...` in the case statement, which requires the enums of the unicode input mode to be in a specific order
I added a new unicode input mode: emacs.
While strictly not an operating system, inserting unicode characters in emacs has its own keybinding. The most usual way is
C-x-8 RET
followed by the unicode in hex. As a person who works across different OSes but with the constant being emacs, this was the most straightforward way forwards.Of course, the main credit goes to TrentinQuarantino in this emacs stack exchange post.
Description
I added a new unicode input mode in
quantum/process_unicode_common.(c|h)
. Then I updated all the programmer friendly numbers of the enums, and added documentation too.Types of Changes
Issues Fixed or Closed by This PR
Checklist
Additional notes
I'm unfamiliar with the testing protocols of this project. If I could get some help that'd be great. I'm reasonably familiar with C. However, what I have done is I have flashed two ergodox-EZs with this and tested it on emacs on both linux and macos. My Windows computer isn't quite available right now, so I'm unable to test on Windows.