Closed IGalat closed 2 years ago
Hi there @IGalat
I'm sorry, but I think this is also a little out of scope for winput, as it's just supposed to be a rather low level interface to Windows' input system.
Sounds like it might be a good extension to have on it's own though (:
Hi again @Zuzu-Typ ,
Would be cool if winput could allow to detect current keyboard layout for active window, and (though less relevant) change it. Here's some code I've found for detection (another) and list of codes.
The idea for me is that I'll create e.g. "en-" and "fr-" keyboard layouts, and then if user wants text in french, I'll use this detect function, and if its language tag isn't "fr-XX", I'll switch until fr- is the language, and after that start typing. Here switching can be done either by another low-level function, or by combo such as win+space (or user-specified one), so for this it's not actually that important to have a switch functionality.
If you want, I'll translate that table of languages to enum and make and MR with it, so winput can give not just the code but all other data as well.