1. Win32lib & key trapping
- Posted by Grape_ Vine_ <g__vine at HOTMAIL.COM> Mar 05, 2000
- 526 views
- Last edited Mar 06, 2000
Hola, I have been playing with keytrapping and i have not been able to get working code. Some times it will do 1/2 of of a procedure the way i want it to, but alas I do not get just HOW to make it work correctly If anyone has a example of working win32lib key trapping I would be very greatfull. The Confused Grape Vine J Reeves ICQ# 13728824 ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
2. Re: Win32lib & key trapping
- Posted by "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV> Mar 06, 2000
- 503 views
"Grape Vine" wrote: > If anyone has a example of working win32lib > key trapping I would be very grateful. Take a look at IDE_EDIT.EW. There are two seperate key traps - one for printable characters, and one for navigation characters. Editor_KeyHandler is hooked to onKeyPress (printable keys), while Editor_KeyPress is hooked to onKeyDown (raw keys, including navigation). Because I like to have a single routine handle the keys, Editor_KeyHandler ends up handling all the keystrokes, including the navigation keys. I do this through a bit of trickery - raw keys values are set negative, and then passed to Editor_KeyHandler. I redefine the keys I'm interested in; i.e.: KeyReturn = VK_RETURN, KeyBack = VK_BACK, KeyEnd = -VK_END, KeyHome = -VK_HOME, KeyUp = -VK_UP, KeyDown = -VK_DOWN ... The call to returnValue( True ) probably isn't needed. I'm trapping keystrokes that are being sent to a (hidden) MLE, and this prevents the MLE from ever seeing the processed keys. Hope this helps. -- David Cuny
3. Re: Win32lib & key trapping
- Posted by Grape_ Vine_ <g__vine at HOTMAIL.COM> Mar 06, 2000
- 537 views
It does, I found pretend.exw and that is also helping... J Reeves Grape Vine ICQ# 13728824 >From: "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV> >Reply-To: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU> >To: EUPHORIA at LISTSERV.MUOHIO.EDU >Subject: Re: Win32lib & key trapping >Date: Mon, 6 Mar 2000 08:53:56 -0800 > >"Grape Vine" wrote: > > > If anyone has a example of working win32lib > > key trapping I would be very grateful. > >Take a look at IDE_EDIT.EW. There are two seperate key traps - one for >printable characters, and one for navigation characters. Editor_KeyHandler >is hooked to onKeyPress (printable keys), while Editor_KeyPress is hooked >to >onKeyDown (raw keys, including navigation). > >Because I like to have a single routine handle the keys, Editor_KeyHandler >ends up handling all the keystrokes, including the navigation keys. I do >this through a bit of trickery - raw keys values are set negative, and then >passed to Editor_KeyHandler. I redefine the keys I'm interested in; i.e.: > > KeyReturn = VK_RETURN, > KeyBack = VK_BACK, > KeyEnd = -VK_END, > KeyHome = -VK_HOME, > KeyUp = -VK_UP, > KeyDown = -VK_DOWN ... > >The call to returnValue( True ) probably isn't needed. I'm trapping >keystrokes that are being sent to a (hidden) MLE, and this prevents the MLE >from ever seeing the processed keys. > >Hope this helps. > >-- David Cuny ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com