getreuer / qmk-keymap

My keymap & reusable QMK gems
Apache License 2.0
301 stars 45 forks source link

Added support for switching OS without flashing #19

Closed Eanilsen closed 1 year ago

Eanilsen commented 1 year ago

As the title states.

I read your post on the select word macro and noticed that in order to swap between OS', which I regularly do, I would have to comment/uncomment the line #define MAC_HOTKEYS, compile, and flash the new firmware each time. To mitigate that I extended your process_select_word function to pass an additional boolean argument.

To use this you have to will have to define a function that returns the value of keymap_config.swap_lctl_lgui, or just pass the value itself, in your keymap.c. Switching between modes is easily handled by mapping the keycode CG_TOGG to a key and toggling when needed, without having to compile and flash new firmware each time.

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

getreuer commented 1 year ago

Thank you for the contribution. This looks great! You're right that a dynamic condition is needed if switching between Mac and other OSs regularly.

In order to merge this, I need you to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. You (or your employer) retain the copyright to your contribution. This simply gives permission to use and redistribute your contributions as part of the project. See https://cla.developers.google.com/ for your current agreements on file or to sign a new one.