Mac OS X vs. Linux: Modifier keys and performance

Ned Konz ned at bike-nomad.com
Mon Aug 5 21:18:41 UTC 2002


On Monday 05 August 2002 03:57 am, reic0024 at d.umn.edu wrote:
> one of the first
> things I noticed in Linux is that Control-, Cmd- and Option-Click
> don't work in the Linux VM like they do on OS X.

Option-click shouldn't do anything in Squeak; is it being used for 
anything?

What do you notice is different?

There is a preference and a command line option that may be able to 
change some of this behavior:

* the "swapMouseButtons" preference
* the -swapbtn command line switch (assuming you've gotten one of 
Ian's recent VMs).

There is always this code in EventSensor that you could change if 
nothing else works:

mapButtons: buttons modifiers: modifiers
	"Map the buttons to yellow or blue based on the given modifiers.
	If only the red button is pressed, then map
		Ctrl-RedButton -> BlueButton.
		Cmd-RedButton -> YellowButton.
	"
	(buttons = RedButtonBit)
		ifFalse:[^buttons].
	(modifiers allMask: CtrlKeyBit) 
		ifTrue:[^BlueButtonBit].
	(modifiers allMask: CommandKeyBit) 
		ifTrue:[^YellowButtonBit].
	^buttons

But there is also code elsewhere that looks for the control key being 
pressed during a click that may pre-empt this in some cases.

That is, in Morph>>handleMouseDown: there is a test for the control 
key being pressed; if it is, you get the meta-menu. 

Does MVC work right?

You may also want to look at what you have those keys mapped to in X. 
This mapping can be changed if necessary.

When you run "xev" you should see the key events for the Alt and Ctrl 
keys look something like this:

KeyRelease event, serial 27, synthetic NO, window 0x3a00001,
    root 0x39, subw 0x0, time 2085057432, (894,728), root:(898,753),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 characters:  ""

KeyPress event, serial 27, synthetic NO, window 0x3a00001,
    root 0x39, subw 0x0, time 2085066406, (894,728), root:(898,753),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 characters:  ""

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list