AW: AW: Is there a mapping table for all rawKeyUp Codes? No solution yet with LC 8

Tiemo Hollmann TB toolbook at kestner.de
Mon Dec 5 17:18:50 CET 2016


Hallo Hermann,

shift + ö and shift + dot both return 58, anyhow if I give the output tot he message box or a field. I can't see a script error. For me it's an engine error.

Same with "-" and "ß", both return 45.
I don't see a chance on how I could differentiate between "-" and "ß", when getting 45.

Perhaps I didn't understood, what you meant to workaround this issue.

Tiemo


-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag von hh
Gesendet: Montag, 5. Dezember 2016 14:55
An: use-livecode at lists.runrev.com
Betreff: Re: AW: Is there a mapping table for all rawKeyUp Codes? No solution yet with LC 8

The '58-example' is obviously a script error:
the message box has always display bugs, you may better use a field for the display.

If I understand right, then you want now the keyCode (an event, depending on _hardware_) and NOT the characterCode (a number representation of the char).
Some Mac apps show, with an abuse of the name, the characterCode and not the hardware keycode.

On a german keyboard from Apple the keycodes are on MacOS 10.12.1/LC 9.0.0-dp2 (65505=shift)

ö = 59
Ö = 59,65505
. = 46
: = 46,65505

This is not contradicting your results if your hardware is different.

You could think about using ___the keysdown___, for example this works for me, using a locked field 1 and the following card script (just to see the difference):

on idle ; put the keysDown into fld 1 ; end idle

p.s. For the LC table (Mark's link) you could use:
     put baseConvert(hexValue,16,10) into decValue

> Since the keyup handler is broken, I am still trying to build a table for mapping the rawkeyup key to a char. When testing a prototype it seemed to be easy, but now there are some pitfalls I don't get over. On Mac OS X 10.11, German system, German keyboard I get with some different char the same keyname.
> 
> When putting the following code into a field:
> *On rawkeyup keyname*
> *put keyname*
> *end rawkeyup*
> 
> e.g.
> Entering shift + dot (":") I get the keyname: 58 Entering shift + ö 
> ("Ö") I also get the keyname: 58
> 
> ... and others...
> How can I map these keynames back to the char?
> 
> Anttis kecode app shows for the first example the keycode 47 and for the second example 41. But that’s not what I get from rawkeyup.
> 
> And with Marks link to the source code I couldn't find a solution either. Because there is only a hex value table included.
> 
> Can anybody confirm these doubled codes from rawkeyup (with a German keyboard)?
> 
> I am stuck with LiveCode 8
> 
> Thanks for any ideas

_______________________________________________
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