Due to the issues mentioned, the script that I posted works if you use only the hotkey to toggle the keyboard. As noted, if you close the keyboard via its "X" button, the process continues to run. In this circumstance of pressing "X", the script does not know whether the keyboard is visible-- though there is probably a way to determine that-- and so you end up with Case 11 even when the keyboard is not visible. In this case, the hotkey must be triggered an extra time. One simple way to check for visibility might be to get the keyboard's dimensions, but I did not test that. This keyboard has some special properties, as it runs over other windows.
Statistics: Posted by mikeyww — Today, 08:06