rawKeyUp/Down give different keys for same char since LC 8

Richmond Mathewson richmondmathewson at gmail.com
Tue Mar 21 14:41:02 EDT 2017


This might be part of the Unicode conformity now present right across 
LiveCode.

hex E4 ( 228 ) is the Unicode address for *ä*

hex 27 ( 39 ) gives a single apostrophe

Testing a German keyboard layout on Mac OS 10.7.5 with LC 7.1.4

I get 39 for *ä, 59 for ö, 45 for ß, 91 for ü with both rawKeyDown and 
rawKeyUp

which suggests that both Macintosh and Windows are playing "fast and 
loose" with Unicode.
**
Testing a German keyboard layout on Mac OS 10.7.5 with LC 8.1.3

I get exactly the same results.

Doing this:

put numToCodePoint(39) into fld "OOT" puts an apostrophe (i.e. the 
correct unicode char)
into fld "OOT".

What I do know is this:

If I use a German keyboard layout on Macintosh and punch the a umlaut 
key I get 39,
but if I use a US keyboard layout and punch the quotes key (i.e the same 
physical key)
I still get 39 (which IS the correct Unicode char 39), so what this 
tells me, at least on Mac
is that "rawKey" reports the RAW KEY pressed, and not the "COOKED KEY".

If I look for the "COOKED KEY" using "keyDown" I get the keyboard layout:

with the German keyboard layout I get an umlauted a, and with the
US keyboard layout I get an apostrophe.

If I get "a bit more clever" and have some sort of code like this:
*

onkeyUp ZZZ

putcodePointToNum(ZZZ) intofld "OOT"

endkeyUp

The US keyboard layout gives me 39, the German one gives me 228

Share my "pain": 
https://www.dropbox.com/s/wz87gld034xxx7e/KeyCatcher.livecode.zip?dl=0

Richmond.

*




*
On 3/21/17 6:40 pm, Tiemo Hollmann TB via use-livecode wrote:
> Hello,
>
> Testing on Win 10, IDE: up to LC 6.7 special chars, as German Umlaute gave
> the same key in rawKeyUp and rawKeyDown, e.g.
>
> ä = 39, ü = 59, ö = 96, ß = 91
>
> in LC 8 and 9 the rawKeyUp are still the same, but in rawKeyDown I now get:
>
> ä = 228, ü = 252, ö = 246, ß = 223
>
>   
>
> Is there any plausible explanation or reason why this had to be changed, or
> is this a bug?
>
>   
>
> I now have found multiple dozens non compatible issues between LC 6 and 8,
> which I had to fix in my program and am waiting every day for new issue.
> It’s a pitty, I didn’t noticed all changes in a logfile.
>
>   
>
> Shall I report this as a bug, or is it not worth to wonder?
>
> Tiemo
>
>   
>
>   
>
>   
>
> _______________________________________________
> 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