I just started using QMK with my Voyager (coming from ZSA's Oryx software) and it's working great so far, but I'm unsure on how to do something and neither Google nor ChatGPT has been all that helpful so far. I do not program in C at all (working bioinformatician, so mainly R, Python and Bash), so please forgive me if my problem is trivial and I missed something simple.
I have some "macros" (that's what Oryx called them) for e.g. copy & paste, currently used as aliases: #define COPY LGUI(KC_C)
. These are for MacOS, but I occassionally use Windows as well, and I'd like them to be cross-platform: switch between using LGUI
and LCTL
, as applicable. I see that QMK does have OS-detecting capabilities (https://www.monotux.tech/posts/2024/05/qmk-os-detection/), but I don't understand how I can get that into an alias/macro/whatever. I think I understand the code being shown there as switching the RGB colour depending on the detected OS, but only once when the keyboard is plugged in. Is it not possible to get the OS detection working inside a macro or something to get me the functionality I want?
By - SajberSpace
Comments