Oliver Steele answered this for me previously. Find the message in this
list with the subject: "mapping onkeydown to character".
Daniel.
Benjamin Shine wrote:
> I think you can do something here like
>
> <method event="onkeydown" reference="LzKeys" args="key">
> if (isKeyDown("capslock") || (isKeyDown("shift")) {
> // treat letters as capital letters
> } else {
> // letters are lower case
> }
> ...
>
> There might be a bug in here; we've had trouble recently with
> modifier keys.
> See http://www.openlaszlo.org/jira/browse/LPP-1830, Shift and control
> keys stick on key-combo when app is swf8.
>
> However, I suggest using an inputtext or edittext, instead of just a
> view. That way the runtime handles turning keycodes into usable
> character data.
>
> On Apr 7, 2006, at 1:19 PM, Denis Bohm wrote:
>
>> I'm implementing a terminal emulator and need to get the keyboard
>> input
>> and send it to the client application. The terminal emulator is
>> derived
>> from view. I'm trying to get the keyboard input using:
>>
>> <method event="onkeydown" reference="LzKeys" args="key">
>>
>> It appears that the key code is that low level keyboard code. For
>> example pressing 'A' key on the keyboard with and without the caps
>> lock
>> on both produce the ASCII code 'A'. How can I get 'a' when caps
>> lock is
>> off and 'A' when caps lock is on? (Caps lock could be on before using
>> the terminal editor.)
>> _______________________________________________
>> Laszlo-user mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
> benjamin shine
> software engineer
> [EMAIL PROTECTED]
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user