Is there a mapping table for all rawKeyUp Codes?

Mark Waddingham mark at livecode.com
Tue Dec 6 09:24:37 CET 2016


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



More information about the use-livecode mailing list