Re: Sending {capslock}
| Newsgroups | gmane.comp.windows.power-pro |
|---|---|
| Message-ID | <[email protected]> |
This would depend on the details of the technical implementation of keyboard I/O in Windows, so I don't know for sure. My guess is as follows: Sending keys in Windows works by putting (simulated) key presses into the input stream of the window with the keyboard focus. These simulated key presses are then treated like actual key presses. Since Caps Lock is disabled, it does not work, whether as a real or as a simulated key press. The key (pun intended) point about "sending" keys in Windows is that the only reliable way to do it is by using the Windows API system routines which do so by simulated key presses. They do NOT literally send a key. At one point in PPro history, I implemented a method to disable caps lock and you can still see the (disabled) check boxes on the gui tab. But it stopped working. It used SetKeyboardState, but this became unreliable (I suspect because it ceased to affect other processes than PowerPro and there was no reliable way to make it affect all of them, especially after UAC was implemented). The only reliable way I know to disable caps lock is to use the registry, as you have done.