1. Win32lib & key trapping

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

new topic     » topic index » view message » categorize

2. Re: Win32lib & key trapping

"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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32lib & key trapping

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 message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu