Did the AltKey change from Version 9.0.1 to 9.0.4?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Did the AltKey change from Version 9.0.1 to 9.0.4?
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.
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.
Monox
Developing a Cyber Physical System.
https://www.monoxware.com/
Developing a Cyber Physical System.
https://www.monoxware.com/
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
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:
- -
-
Picture of stack that doesn't work removed.
-
containing a goofy cardScript:
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.
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:
- -
Um . . . here's a goofy stack:some shortcuts I had on "rawKeyDown" message
-
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
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.
Last edited by richmond62 on Thu May 23, 2019 9:49 am, edited 2 times in total.
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Ha, Ha, Ha; the fact that last stack did not work says more about my standard of coding
than anything else . . .
This one:
- -
works . . .
give it a whirl on your machine and see what it returns.
than anything else . . .
This one:
- -
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
- Attachments
-
- ALT.livecode.zip
- Stack
- (925 Bytes) Downloaded 164 times
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
macOS 10.14.5 with LC 9.0.4
A button with:
gives up resp. down with the left AND right ALT key.
OK, there is no "ALTgr" key on the Mac, just two "alt" keys.
A button with:
Code: Select all
on mouseUp
put the altkey
end mouseUp
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?
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:
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.
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.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.
Monox
Developing a Cyber Physical System.
https://www.monoxware.com/
Developing a Cyber Physical System.
https://www.monoxware.com/
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
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?
And this is documented, mon ami!richmond62 wrote: ↑Thu May 23, 2019 7:43 pmMy problem is that on a Macintosh the AltKey does not send a rawKey value.
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.
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
I know all about modifier keys on Macintoshes: in fact have known all about them since 1993.this is documented
Possibly not
quite as much as you may imagine,mon ami
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.
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
Not quite true. Just try:this is documented
Code: Select all
on idle
put the keysDown
end idle
The keycodes returned by the keysDown function are the same as those passed as parameters with the rawKeyDown and rawKeyUp messages.
shiftLock happens
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
That was not meant to be sarcastic.richmond62 wrote: ↑Thu May 23, 2019 8:07 pmI know all about modifier keys on Macintoshes: in fact have known all about them since 1993.this is documented
Possibly notquite as much as you may imagine,mon ami
as getting fed up with the sarcastic remarks.
...
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.
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Did the AltKey change from Version 9.0.1 to 9.0.4?
and your point is what?you just started with LC yesterday
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?
I don't have a "point" and you understand very well what I wrote.