-
Notifications
You must be signed in to change notification settings - Fork 88
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
Support for switching unicode method/OS #2
Comments
Unfortunately, without native ZMK support for unicode, it won't be possible to "hotswap" the OS. The best you can do is to create two separate layers with the corresponding unicode macros for each OS. For instance, to create both Windows (WinCompose) and Linux versions of a unicode macro, you could do the following: // activate Linux-mode for helper script
#undef OS_UNICODE_LEAD
#undef OS_UNICODE_TRAIL
#define OS_UNICODE_LEAD ¯o_tap &kp LS(LC(U)) // <- Linux compose sequence
#define OS_UNICODE_TRAIL ¯o_tap &kp SPACE // <- Space terminates unicode input on Linux
// use helper-script to define linux unicode macros, e.g.,
ZMK_UNICODE_PAIR( lin_ae, N0, N0, E, N4, N0, N0, C, N4 )
// switch to Windows-mode (using WinCompose) for helper script
#undef OS_UNICODE_LEAD
#undef OS_UNICODE_TRAIL
#define OS_UNICODE_LEAD ¯o_tap &kp RALT &kp U // <- WinCompose sequence
#define OS_UNICODE_TRAIL ¯o_tap &kp RET // <- Return terminates unicode input on Windows
// use helper-script to define Windows unicode macros, e.g.,
ZMK_UNICODE_PAIR( win_ae, N0, N0, E, N4, N0, N0, C, N4 ) Once you have the unicode macros for both OS, you can add them to a "Linux" and "Windows" layer on your keymap, and then use |
Just for completeness, to activate macOS, you would do: // activate macOS-mode for helper script
#undef OS_UNICODE_LEAD
#undef OS_UNICODE_TRAIL
#define OS_UNICODE_LEAD ¯o_press &kp LALT // <- macOS compose sequence (must be activated in system preferences)
#define OS_UNICODE_TRAIL ¯o_release &kp LALT // <- Releasing Left-Alt terminates unicode input on macOns |
Thank you, I will try setting this up |
It would be useful the be able to have a windows and linux version of a unicode macro at the same time, so you can toggle depending on what system the keyboard is connected to
The text was updated successfully, but these errors were encountered: