Polyglot keyDowns

dunbarx at aol.com dunbarx at aol.com
Sun Dec 15 16:32:27 EST 2013


How is the virtual keyboard made? Can it have discrete objects under each virtual key so that those objects are mapped, maybe by name, to the translated letter you want? Can't you then use the "mouseWithin" or  "mouseEnter" message to locate the virtual key over which the pointer is resting, and use the target to do what you need?  You could change the names of all those hidden objects by script to change the mapping in one shot as well.


-----Original Message-----
From: Richmond <richmondmathewson at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Sun, Dec 15, 2013 3:55 pm
Subject: Re: Polyglot keyDowns

On 15/12/13 22:48, Richmond wrote:
> On 15/12/13 22:38, dunbarx at aol.com wrote:
>> Richmond.
>> Can you give an example of what you are trying to achieve when you 
>> say you want to send a message to a key? It cannot be just this, I 
>> assume:
>> in a button:
>> on mouseUp
>> ask "Choose a Key"
>> keyUp it
>> end mouseUp
>> in the card script:
>> on keyUp var
>>    answer var
>> end keyUp
>> This sends a keyUp message with a key as a parameter. Is that like 
>> sending a message to a key? What is different in what you want to do?
>> Craig
> I have a virtual keyboard for typing Old Church Slavonic and it will 
> be used by a wide variety of people wit
> English, Bulgarian, Russian, Serbian, Macedonian and Armenian 
> keyboards (among others).
> When an end-user lets his/her pointer enter a virtual keyboard button 
> I want the key on the physical
> keyboard to which that is matched to appear in a textField.
> So; for the sake of argument, when I pass my mouse over the letter "Ѭ" 
> which I have mapped to the key that yields a rawKey code 112, on my 
> English keyboard 'p' should appear in the textField, while on
> a Bulgarian's machine a 'з' or a 'п' should appear, depending on which 
> keyboard mapping s/he is using.
> Richmond.

This should involve sending a keyDown/keyUp signal that corresponds to 
the rawKeyDown/Up code 112;
which varies according to keyboard layout.

Imagine this:

send "keyUp" to rawKey(112)

'twould be lovely.


use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 


More information about the Use-livecode mailing list