Page 1 of 1
Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Wed May 22, 2019 10:07 pm
by Monox18
I just installed LC 9.0.4 and while trying it out found that some shortcuts I had on "rawKeyDown" message, the function "the altKey" was changed from Alt (left) to AltGr (Right Alt).
Basically everything I had working with Alt is now working with AltGr instead. So what are exactly the proper functions for "Alt" and "AltGr" keys?
I temporalily commented out "rawKeyDown" and tried "optionKeyDown theKey" message. But it seems to be stuck sending an indeterminate amount of "65513" as theKey content as long as the Alt key is pressed. With no other number whatsoever with any character combination. In 9.0.1, seems to work somewhat better, still indeterminates 65513 but with also the character combination.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 8:25 am
by richmond62
Let's start off by finding out which operating system your computer is running.
As you mention "AltGr" and don't mention the OS I assume you are like the majority of Windows users
who have great difficulty conceiving of a computer without Windows (and, Yes, that is meant as a
slightly unpleasant remark).
The it might not be a bad idea to pop over to LiveCode's inbuilt documentation (good in parts) and
read this:
-
-
some shortcuts I had on "rawKeyDown" message
Um . . . here's a goofy stack:
-
Picture of stack that doesn't work removed.
-
containing a goofy cardScript:
Code: Select all
on keyDown
if the altKey is up then
put "up" into fld "ff"
end if
if the altKey is down then
put "down" into fld "ff"
end if
end keyDown
on keyUp
put empty into fld "ff"
end keyUp
which, on a Macintosh with LC 9.0.4 does NOT seem to register
when I have either of the ALT/OPT keys pressed down.
And does not work either with LC 8.1.10 . . .
Attached zip file removed: refer to next posting.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 9:48 am
by richmond62
Ha, Ha, Ha; the fact that last stack did not work says more about my standard of coding
than anything else . . .
This one:
-

- Screenshot 2019-05-23 at 11.45.21.png (12.85 KiB) Viewed 6409 times
-
works . . .
Code: Select all
on rawKeyDown RD
if (altKey() = up) then
put "up" into fld "ff"
else
put "down" into fld "ff"
end if
end rawKeyDown
give it a whirl on your machine and see what it returns.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 10:43 am
by Klaus
macOS 10.14.5 with LC 9.0.4
A button with:
Code: Select all
on mouseUp
put the altkey
end mouseUp
gives up resp. down with the left AND right ALT key.
OK, there is no "ALTgr" key on the Mac, just two "alt" keys.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 7:01 pm
by Monox18
Ok thanks for the reply. I always forget to put the OS, so I will try writing it more often. This one is Windows 8.1 Pro.
So I downloaded your stack and sigthly changed it to display the code of the character combination:
Code: Select all
on rawKeyDown RD
if (altKey() = up) then
put "up" into fld "ff"
else
put RD into fld "ff"
end if
end rawKeyDown
on LC 9.0.1 everything works as Intended. Both Alt and AltGr alone will send 65513. Pressing any other key alone will show "up". And pressing any Alt+key or AltGr+key combination you will see a number for the given key. So far so good.
On LC 9.0.4 the AltGr+key combination is still working whereas the Alt+key combination stops working, and sends a beep sound instead. This is the issue I was trying to address on my original post.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 7:43 pm
by richmond62
My problem is that on a Macintosh the AltKey does not send a rawKey value.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 7:48 pm
by Klaus
richmond62 wrote: ↑Thu May 23, 2019 7:43 pm
My problem is that on a Macintosh the AltKey does not send a rawKey value.
And this is documented, mon ami!
From the dictionary about "rawkeyup":
...
Sent when the user releases any key that was pressed (
other than a modifier key).
...
Modifier Keys:
...
A key that modifies the effect of pressing another key, instead of typing a character.
Modifier keys include Shift, Control, Caps Lock, and the Command key (on Mac OS and OS X systems), and the Option key, Meta key, or Alt key.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 8:07 pm
by richmond62
this is documented
I know all about modifier keys on Macintoshes: in fact have known all about them since 1993.
Possibly not
mon ami
quite as much as you may imagine,
as getting fed up with the sarcastic remarks.
The only way this is a "problem" is insofar as I have no Linux box connected up just now at
home and felt too lazy to set one up or nip over to use one of the Linux boxes at my school.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 8:23 pm
by [-hh]
this is documented
Not quite true. Just try:
Modifier keys are reported, so the dictionary is partially wrong with
The keycodes returned by the keysDown function are the same as those passed as parameters with the rawKeyDown and rawKeyUp messages.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 8:28 pm
by Klaus
richmond62 wrote: ↑Thu May 23, 2019 8:07 pm
this is documented
I know all about modifier keys on Macintoshes: in fact have known all about them since 1993.
Possibly not
mon ami
quite as much as you may imagine,
as getting fed up with the sarcastic remarks.
...
That was not meant to be sarcastic.
You have to confess that sometimes your postings appear as if you just started with LC yesterday, so one never knows if you know about some basic facts or not.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Thu May 23, 2019 9:11 pm
by richmond62
you just started with LC yesterday
and your point is what?
You KNOW, full well, I started with LiveCode yesterday.
Mind you "yesterday" is all a bit relative and open to interpretation.
AND it is a pain in the bum that MacOS does not feed rawKey numbers through to LiveCode
for ALT, CTRL and COMMAND they way Linux and Windows do.
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Posted: Fri May 24, 2019 9:15 am
by Klaus
I don't have a "point" and you understand very well what I wrote.