duplicateControlAndAltKeys not working on WinXP

Andreas Raab andreas.raab at gmx.de
Sat Nov 1 21:19:53 UTC 2003


Hi Lex,

> Well, I made a proposal buried back in the depths of the 
> thread.  Encode control+a as "a plus control" instead of
> "control-a plus control".  I see no lossage from this
> encoding and it would solve the immediate problem.

It may solve the immediate problem but conceptually this is very wrong since
(assuming that the VM does any character translation at all) the combination
of the (physical) key strokes "control + A" _should_ result in control-A. If
we start going down this path, then we essentially "untranslate" the VM
translation efforts (which seems pointless to me) and may introduce many
other ugly idiosynchracies. So it seems better to use what the VMs are
providing anyway - untranslated keyDown/keyUp events for determining "raw"
key strokes and using keyStroke events for the "composed" characters.

> Oh, that's very nice, you can handle keyDown: and keyUp: and 
> get the raw events.  Is it intended that these keystrokes are
> the same across platforms when possible?

We talked about this in the past and didn't come to an ultimate solution.

> For example, is it intended that End and Copy
> are the same on all platforms that have them?

That would definitely be the best solution though I am not certain all of
the different keyboards will agree on what the "same" keys are ;-) But it's
worth to shoot for it.

> As it stands, it looks like this facility is not implemented very well
> at least on Unix.  For example, I tried this code:
> 
> 	buf := OrderedCollection new.
> 	[ buf size < 10 ] whileTrue: [
> 	  evt := Sensor nextEventFromQueue.
> 	evt ifNotNil: [ buf add: evt ] ].
> 	buf
> 
> Then I pressed ctrl-end and then ctrl-d and then waved the 
> mouse around. The events I see are the following:

Here's the equivalent on Windows:

#(2 14686478 17 1 2 0 0 0) "ctrl down"
#(2 14686688 68 1 2 0 0 0) "D down"
#(2 14686688 4 0 2 0 0 0)  "ctrl-D"
#(2 14686798 68 2 2 0 0 0) "D up"
#(2 14686828 17 2 0 0 0 0) "ctrl up"

#(2 14687589 17 1 2 0 0 0) "ctrl down"
#(2 14687789 4 1 2 0 0 0)  "end down"
#(2 14687789 4 0 2 0 0 0)  "ctrl-end"
#(2 14687870 4 2 2 0 0 0)  "end up"
#(2 14687950 17 2 0 0 0 0) "ctrl up"

> So, I see alt-d being released, and then the other 6 key 
> events all have value "4".

That seems wrong to me.

> The control key itself doesn't generate any events.

That too.

> I've mentioned before, though maybe not on the list, that the XWindows
> list of key symbols might be worth re-using in Squeak for the 
> purpose of encoding these values.

If someone sends me a comprehensive list of these values I'd be happy to
make the VM conform to these.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list