[futurebasic] Re: [FB] intercepting, changing, creating _keydown events

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 1999 : Group Archive : Group : All Groups

From: Mark Goodes <wave@...>
Date: Sun, 11 Jul 1999 23:27:24 -0400
>I could do _keydown and _keyrepeat events from an INIT if I treated them as
>Integer but  I didn't have a good way to communicate with my background

There are two answers to this:
1.  To do this, you would install a custom gestalt selector that returns a
pointer to your common variable block.  It's kind of complicated to do
this, so I recommend
2.  Do all the work from your INIT.  Use the GETNEXTEVENT shell that came
with the FBII example code.

>This progam is for typing khmer (the national language of Cambodia) as roman
>script but having it changed to khmer script as you type. The idea was to
>have my program intercept the characters that the user typed and when it had
>a whole sylable it would translate it into khmer script, create enough
>"delete" events to erase the roman script sylable and finally send the khmer
>translation as keydown events to the frontmost application.

You could probably do this without having to generate delete events if you
just changed the characters on the fly in your INIT.

Have you tried using a modified kmap resource instead to accomplish your
goal?  It might be a simpler and quicker solution.


(Even though this was originally a private e-mail, I'm posting it to the
list since Anders posted his reply, and others may be following the


Mark Goodes (Toronto, Canada)