send "keyUp" / "rawKeyUp" ?

hh hh at hyperhh.de
Wed Feb 28 04:19:11 EST 2018


If I understand correctly what you have in mind then you could
try the following.

Clicking the button will place one copy of numToCodepoint(M)
into both fld 1 and fld 2.
Type into the fields as usual, especially you can delete.
Typing outside the fields ("blind") will put one copy of
space&char into fld 1 and two copies of space&char into fld 2.

on mouseUp
 put 113 into M
 send "rawkeyDown M" to me
end mouseUp

In card's script:

on rawKeyDown N
  if the target contains "field "
  then pass rawKeyDown
  put numToCodepoint(N) into X
  send "keyUp X" to me
  put space & X after fld 1
end rawKeyDown

on keyUp K
  if the target contains "field "
  then pass keyUp
  put space & K after fld 2
end keyUp

> Richmond M. wrote:
> 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.




More information about the Use-livecode mailing list