I currently use US ANSI (en_US) as my main typing layout when using a keyboard. I live in Finland so I often need to use ÖÄÅ when writing. My current setup is as follows:
1. OS (Ubuntu and Windows) has two input languages configured: en_US and fi_FI.
2. OS quick switch between input languages is setup (Shift-Alt on Windows, Gui-Space on Ubuntu).
3. Everything defaults to en_US.
4. When I need to type ÖÄÅ I use the language quick-switch key and type using "FI ANSI".
5. I revert to en_US with the quick-switch key again.
This is somewhat OK but I have been thinking about making it a tad simpler on my QMK powered boards.
What I'm currently looking at are macros and leader keys. The idea is that when I press down RAlt the board automagically sends Shift-Alt and Gui-Space combos to switch language in my OS, and when I release RAlt the same combos are sent again to revert the input language change.
I wonder how the keyboard and OS interact if I send _both_ the Windows and Ubuntu quick-switch combos at the same time. I wonder if there is a way to sniff the current OS inside QMK and determine the combo that way?
Would this be possible? I presume with leader key I'm restricted to sending a single character at a time and I would need to spam the leader key in order to type something like "hyvää yötä", which is kinda worse than just using the quick-switch normally. From the looks of the documentation, macros are more aimed towards inputting characters in sequence instead of using a "layer" of sorts.
Would there be any way of making this a layer thing? As in when a layer is enabled QMK sends the language switch combo and then resends it when the layer is disabled?
So instead of doing
Gui-Space, then, ;'[ (to get öäå)
and/or
Shift-Alt, then, ;'[
I would want to do
RAlt + ; (for ö)
RAlt + ' (for ä)
RAlt + [ (for å)
all while "being inside" en_US input language.
Any pointers would be appreciated.