AW: Is there a mapping table for all rawKeyUp Codes? No solution yet with LC 8
Richmond Mathewson
richmondmathewson at gmail.com
Mon Dec 5 13:57:32 EST 2016
Um . . .
On 12/5/16 1:58 pm, Tiemo Hollmann TB wrote:
> Since the keyup handler is broken,
I am not entirely sure what you mean by this . . . I am currently
running LiveCode 8.1.1 on
Mac OS 10.7.5 and have a boring little stack with 2 fields, "ff" & "gg",
and this in the cardScript:
onrawKeyDown KN
putKN intofld "ff"
endrawKeyDown
onkeyUp KD
putKD intofld "gg"
endkeyUp
and that dumps the rawKey codes into field "ff" and the keycodes into
field "gg"
just exactly as I would expect it to.
I wonder if this is something to do with Mac OS 10.11?
> 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
I have just tried that, and, Yes, you are quite right.
If you set up a stack with 2 fields, "ff" & "gg" and put this script in
the card:
onrawKeyUp KN
putKN intofld "ff"
endrawKeyUp
onkeyDown KD
putKD intofld "gg"
endkeyDown
and then enter shift + dot (":") [German keyboard layout, Mac OS 10.7.5],
you do get 58 in fld "ff" and ":" in fld "gg".
if you then enter shift + ö ("Ö") you do get 58 in fld "ff" and "Ö" in
fld "gg"
which does seem very odd indeed.
I wonder how Macintosh tells the difference between whether I press key
"58" or key "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
>
>
<snip>
Richmond.
More information about the use-livecode
mailing list