I have a french and a US keyboard on my computer. I'm using awesome wm and have set everything so that it is easy for me to switch between keyboard layout. But I still have to do it myself.
Theoretically, it should be possible for the computer to understand from which keyboard the input event comes and use the layout associated with the keyboard. I have looked it up but found no good answer. Is it possible to do so ?
I was thinking that I could write a short code analyzing keyboard event and do the switch, but :
- it would run in parallel with the event handler so there could be concurrency problem (something like this);
- it looks like a dirty way of doing it and I prefer a clean solution.
Thanks for your help