Comments (3)
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 &to
to toggle between them.
from zmk-helpers.
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
from zmk-helpers.
Thank you, I will try setting this up
from zmk-helpers.
Related Issues (20)
- ZMK_UNICODE_PAIR not working in Linux HOT 1
- ZMK_BEHAVIOR Macro no longer working after update HOT 1
- Unable to build due to missing helper.h HOT 3
- error unicode macro HOT 4
- Unicode for Windows 10 HOT 2
- Is there a command to preview the preprocessed code? HOT 2
- Encountered an error while using ZMK_UNICODE_SINGLE HOT 2
- Missing LICENSE HOT 2
- Unable to use international helper HOT 4
- Unicode input for Linux doesn't work for all applications
- Homerow Mods make dead key working intermittently
- Unicode pair using correct OS setting mistakenly uses Alt-codes method HOT 2
- Bluetooth connection sometimes lost when sending unicode to M1 Mac HOT 6
- add submodule to custom-shield
- Build fails because of malformed value HOT 4
- Cant implent the german umlaute HOT 3
- Add support for layer labels HOT 5
- some international characters seem not to be available via compose mechanism HOT 3
- Error building through Github workflows HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zmk-helpers.