[Openmcl-devel] opengl rubix example
gb at clozure.com
Mon May 2 18:59:19 EDT 2005
On Mon, 2 May 2005, Hamilton Link wrote:
> I'm not using GLUT to handle keyboard or mouse events, I'm using NSOpenGLView
> for display, which inherits NSView's handling of events.
> If I'm understanding your problem correctly, your single-button mouse won't
> work. #$NSRightMouseDragged and kin, as far as I can tell, require
> right-clicking... in other words, use a multi-button mouse's right button.
> Ranting aside (I *hate* apple's policy of shipping landfill-caliber
> one-button mice with their systems and giving me only one laptop mouse
> button), er, d'oh...
> Ranting aside, the OS doesn't give NSRightMouse-anything to an app when
> ctrl-clicking with a single button, it still gives left mouse events with
> modifiers. I haven't actually written the little bits of code into the rubix
> example to check for modifiers on the left-mouse button (the "only" mouse
> button), and probably won't, because I assume that a large fraction of
> Apple's consumer population buys real mice.
> As a side note: Yes, this does mean that every apple program that handles
> ctrl-click as right-click has to be specifically coded to do so.
As far as the last point goes: note that the default/standard action
for right-click/control-left-click is to invoke whatever contextual
menu is attached to the responder; it seems to be true that
control-left-click isn't magically transformed into right-click for
you, but it's also true that programs that want the default/standard
action don't have to do anything special to get it.
More information about the Openmcl-devel