Here we go again: I reply to my own posting:
So: I have 2 fields and a button; the button having this sort of script:
on mouseUp
put empty into fld "fff"
select after fld "fff"
type "q"
end mouseUp
and the cardScript of the stack having this sort of script:
on rawKeyDown RD
put empty into fld "sss"
put RD into fld "sss"
end rawKeyDown
at which point, on clicking on the button I get "113"
in field "sss", and, oddly enough, empty in field "fff".
Of course that doesn't help me at all as I want to do things the other
way round:
i.e. I want to send a rawKeyDown signal that fakes typing on the key on
my keyboard
that has the underlying rawKey code of 113.
Richmond.
On 25/2/2018 9:50 pm, Richmond Mathewson wrote:
That looks like a good way to start (even though it is the wrong way
round).
The next questions (now I'm on a roll, I'll keep rolling) are these:
1. How do I type a rawKey command? I probably cannot.
2. If I have a script that runs type "q" how do I trap therawKeyDown
and the rawKeyUp codes
so I can get them into a field?
In terms of calibration all this will do is nothing as a stack that
has type "q" is a script will
do just that regardless of the end-user's keyboard layout.
I just set my keyboard layout on my ancient iMac (10.7.5) to Bangla
(Bengali), which wouldn't know
a "q" to save its life.
My test stack still typed a "q" into my field.
I wonder what rawKeyDown and rawKeyUp the type command actually sent?
I have a fantasy that goes a bit like this:
Pseudocode
select after field "ff"
send "rawKeyUp[113]"
but LiveCode "doesn't love me" that much.
Richmond.
On 25/2/2018 8:44 pm, Paul Dupuis via use-livecode wrote:
See the dictionary entry for the "type" command. This sends
rawKeyUp|rawKeyDown messages
This might let you construct a stack that "calibrates" (or whatever you
want to call it) what keys on any keyboard generate what keyDown number
and what characters
On 2/25/2018 5:09 AM, Richmond Mathewson via use-livecode wrote:
Erm . . .
I want to set up a stack that will list an end-user's keyDowns by
sending their system
a set of rawKeyUps . . .
PseudoCode:
in a button:
on mouseUp
send "rawKeyDown" to key 113
end mouseUp
in the cardScript:
on rawKeyDown XX
get keyUp XX
put XX somewhere useful
end rawKeyDown
Richmond.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode