Re: Win32Lib Question
- Posted by David Cuny <dcuny at LANSET.COM> Sep 15, 1999
- 478 views
Irv wrote: >I need to write a Windows program which will respond to keystrokes >regardless of which control has focus. > >onKeyPress[ x ] works if x is a control, but not if x is the main Win. It should work just fine, no matter what the window is. Keep in mind that onKeyPress sees only 'printable' keys (more or less), while onKeyDown sees all keys (but only as key codes). I'm giving some serious consideration into folding these two functions into a unified onKey function. WM_KEYDOWN would pass the cursor-type events, while WM_CHAR would pass 'normal' keys. I'll also probably be adding the Shift and Control key states as parameters. -- David Cuny