Scroll events
John M McIntosh
johnmci at smalltalkconsulting.com
Fri Mar 18 20:31:49 UTC 2005
I'm sure this is a change from our original thoughts to generate
unicode values for the keydown/keyup. I'll note you could be using a
input palette and not a keyboard device so you won't get any key
up/down events, and you imply that you are supplying unicode values for
the keystroke, versus the historical MacRoman? So how does a unicode
character flow up in Windows?
For the most part I am using the unix keyboard logic for os-x to track
the key up/down strokes, so given your accented character
a) we remember the keyDown,
b) translation input services gives us the unicode for á (accented-a)
which I generate as a keyDown unicode. This is after translation
services has digested all the keystrokes and made a decision on what it
all means.
c) I translate that into the macroman character for á (accented-a)
which could depending on your language choice be different than the
unicode, which I generate as a KeyChar
d) when the key goes up I have remembered the unicode for á
(accented-a) which I generate as a keyUp.
*If input services gives us a unicode, or input palette services give
us a unicode for which there is no MacRoman translation then the
keyChar value is unicode. I'll note that input palette services can
give us a string of unicode which is translated into synthetic
keydown/keychar/keyup values.
It could be possible under os-x to generate the keydown/keyup and
keychar as suggested but I'm not sure what that would break. The only
information I have is the keycodes which are values mapped to keys and
depend on the keyboard used and would require a translation table in
smalltalk.
On Mar 18, 2005, at 10:59 AM, Andreas Raab wrote:
> the image as EventKeyChar. For example, here is a sequence that will
> generate the "á" character on my keyboard:
>
> keyDown: ´ (accent key)
> keyUp: ´ (accent key)
> keyDown: A
> keyUp: A
> keyStroke: á (accented-a)
>
> Note that the accent *key* did NOT generate an accent *character* - it
> was subsumed by the subsequent combination with the A key to generate
> the accented á character.
>
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Vm-dev
mailing list