Page 1 of 1
rawKeyUp pKeyCode &rawKeypDown pKeyCode
Posted: Sat Feb 22, 2020 7:53 pm
by dntknwjck
Hi
Just wondering if there is a list somewhere of the value for pKeyCode values returned in the rawKey handlers.
Thanks
Re: rawKeyUp pKeyCode &rawKeypDown pKeyCode
Posted: Sat Feb 22, 2020 8:06 pm
by bogs
Well, you could always do something like -
https://sites.google.com/a/pgcps.org/livecode/keyboards wrote:B. Seeing what the handlers return for each key on the keyboard
To see the number for a key, add this code to the card script:
on updateScreen
put keysdown( ) into msg
send updateScreen to me in 20 millisec
end updateScreen
then add a button on the card:
on mouseUp
updateScreen
end mouseUp
As you press every key on the keyboard, this will show the return value of each key as you press it, in the msgbox (This is one of the icons on the Edit Bar of LiveCode).
Take out that line of code when you have noted the numbers of all the keys that you need to handle.
Re: rawKeyUp pKeyCode &rawKeypDown pKeyCode
Posted: Sat Feb 22, 2020 10:18 pm
by FourthWorld
dntknwjck wrote: ↑Sat Feb 22, 2020 7:53 pm
Just wondering if there is a list somewhere of the value for pKeyCode values returned in the rawKey handlers.
Too vast, containing all keys and some special combinations, some of them differing by platform. You wouldn't want to read it.
Better to focus on solving the problem at hand: what would you like to do?
See Bogs' example above if you want to respond to a specific set of keys.
Re: rawKeyUp pKeyCode &rawKeypDown pKeyCode
Posted: Sat Feb 22, 2020 10:35 pm
by bogs
FourthWorld wrote: ↑Sat Feb 22, 2020 10:18 pm
See
Cyril Pruszko's example above if you want to respond to a specific set of keys.
There, fixed that for you
