AW: Is there a mapping table for all rawKeyUp Codes?

Tiemo Hollmann TB toolbook at kestner.de
Tue Dec 6 04:02:28 EST 2016


Hi Mark,
thank you for jumping in. interesting to know your explanations.

I was catching the user input to pass it to a SQL for selecting data. I will
modify my script to *textChanged* and see what happens (probably it will be
solved).

Thanks
Tiemo


-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag
von Mark Waddingham
Gesendet: Dienstag, 6. Dezember 2016 09:25
An: How to use LiveCode <use-livecode at lists.runrev.com>
Betreff: Re: Is there a mapping table for all rawKeyUp Codes?

Hi Tiemo,

On 2016-11-24 17:31, Tiemo Hollmann TB wrote:
> since keyUp doesn't works anymore  as it should on windows in LC 7/8 
> (see my previous post) I have to workaround with rawKeyUp.

Can you explain what effect you are trying to achieve? There might be
another way to do what you want.

The keyUp message isn't quite what it appears to be - it is a synthetic
message generated by the engine *after* passing a keyDown event through the
message path. In particular, it has no direct relation to the user actually
releasing a key.

In theory, keyUp is equivalent to doing:

   on keyDown pKey
     send "keyUp pKey" to me in 0 millisecs
   end keyDown

In general, there is no guaranteed one-to-one mapping between key strokes
and keyDown/keyUp messages as it can sometimes take multiple key presses to
generate a single character (e.g. alt-e e to get e-acute on Mac). This makes
doing any wrangling from rawkey codes to characters quite hard - as it
depends entirely on the specific keyboard layout a user has set, or which
input method is in use.

If you are doing entry into a field and want to be notified of a user
editing action which has changed the content *after* the content has been
changed you could try using the 'textChanged' message. This is sent after
any user editing operation has completed, but before the screen is unlocked
and the changes displayed.

Warmest Regards,

Mark.

--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list