moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.79k stars 248 forks source link

Keyboard Layout change detection issue and workarounds #377

Open subamanis opened 3 years ago

subamanis commented 3 years ago

(On Windows 10)

Hello, I was having trouble with getting the latest version of pynput (1.7.3) to recognise keyboard layout changes (eng,gr languages, if it is of any importance) as described in this #50 issue (that was closed for some reason), even when the focus window wasn't cmd, and I can confirm that up until version 1.3.10 the change detection works fine (but in versions 1.2.0 ,..., 1.3.10 the keyboard shortcut for changing the layout isn't working most of the times when the program is running, meaning Windows just wont change the language 70% of the time). So the only viable option is to revert back to version 1.1.7, or use the workaround described by @ppel123 here: #226 (although I haven't personaly verified that it works, and I am a little worried about performance when doing those manual conversions with every keystroke).

It would be nice for it to get fixed, cause we are sacrificing a lot of functionality by using 1.1.7