Re: Win32lib & key trapping

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu