From: Cameron L. <cl...@la...> - 2004-04-24 09:24:52
|
I *think* I circulated a muddled question yesterday. Rather than writing, I'm working with a code base with abundant bind $w <Button-3> ... and so on, and wonder if there's a canoni- cal want to create this event with a standard Macintosh one-button mouse, I had some nonsense about <Double>. Anyway, my question stands. I know I've seen discussions of this before. Some toolkits map, for example, control-click to Button-3. I haven't yet figured out, though, how Tk handles this. |
From: Steve L. <steve@DigitalSmarties.com> - 2004-04-24 10:35:41
|
On 24/04/2004, at 5:23 PM, Cameron Laird wrote: > I *think* I circulated a muddled question yesterday. > Rather than writing, > I'm working with a code base with abundant > bind $w <Button-3> ... > and so on, and wonder if there's a canoni- > cal want to create this event with a standard > Macintosh one-button mouse, > I had some nonsense about <Double>. Anyway, my > question stands. I know I've seen discussions of > this before. Some toolkits map, for example, > control-click to Button-3. I haven't yet figured > out, though, how Tk handles this. You do know the effect of pressing Option+button, control+button, Apple+Button, etc? Steve -- Steve Landers Software Design Solutions Digital Smarties steve@DigitalSmarties.com Perth, Western Australia DigitalSmarties.com |
From: Cameron L. <cl...@la...> - 2004-04-24 12:03:14
|
> From tcl...@li... Sat Apr 24 05:36:58 2004 > . > . > . > You do know the effect of pressing Option+button, control+button, > Apple+Button, etc? > . > . > . No. I'm barely at the house-broken stage (I have a PowerBook which I prize a great deal, and plans to buy a couple more Macs for our office, but my PowerBook is also scheduled for its third return for factory repair. My point is that my experience remains quite limited; I don't have a good feel for how Mac folks think and act). |
From: Neil M. <ne...@cs...> - 2004-04-24 10:56:54
|
On 24 Apr 2004, at 10:23, Cameron Laird wrote: > I *think* I circulated a muddled question yesterday. > Rather than writing, > I'm working with a code base with abundant > bind $w <Button-3> ... > and so on, and wonder if there's a canoni- > cal want to create this event with a standard > Macintosh one-button mouse, > I had some nonsense about <Double>. Anyway, my > question stands. I know I've seen discussions of > this before. Some toolkits map, for example, > control-click to Button-3. I haven't yet figured > out, though, how Tk handles this. Cameron - not sure if TkAqua does this for you (doesn't look like it), but I think control-click is roughly equivalent to right-click from my experience. You could do something like: bind . <Control-Button-1> [list event generate . <Button-3>] You might need to be a bit more clever to make sure that %x %y etc stuff is correct in the new event. This makes me wonder though; would it be a good rule of thumb to always bind to virtual events? That would probably make this sort of thing much easier: event add <<RightClick>> <Button-3> <Control-Button-1> bind . <<RightClick>> { ... } A related question: I have a 3-button mouse which I use with os x. However, the right mouse button gets delivered as <Button-2> and the middle as <Button-3>, which is different to how most apps bind to right and middle mouse button normally. I've been told that this is just a misconfiguration of my mouse somewhere, but I'm not so sure - the right mouse button acts correctly in every application other than Tk-based ones. Anyone have any clues? If it is a misconfiguration - anyone know where to correct it? Cheers, Neil. |
From: Cameron L. <cl...@la...> - 2004-04-24 12:00:17
|
> From tcl...@li... Sat Apr 24 05:58:10 2004 > . > . > . > Cameron - not sure if TkAqua does this for you (doesn't look like it), > but I think control-click is roughly equivalent to right-click from my > experience. You could do something like: > bind . <Control-Button-1> [list event generate . <Button-3>] > You might need to be a bit more clever to make sure that %x %y etc > stuff is correct in the new event. This makes me wonder though; would > it be a good rule of thumb to always bind to virtual events? That would > probably make this sort of thing much easier: > event add <<RightClick>> <Button-3> <Control-Button-1> > bind . <<RightClick>> { ... } > A related question: I have a 3-button mouse which I use with os x. > However, the right mouse button gets delivered as <Button-2> and the > middle as <Button-3>, which is different to how most apps bind to right > and middle mouse button normally. I've been told that this is just a > misconfiguration of my mouse somewhere, but I'm not so sure - the right > mouse button acts correctly in every application other than Tk-based > ones. > Anyone have any clues? If it is a misconfiguration - anyone know where > to correct it? > . > . > . It sounds as though you're saying that, yes, Mac users are accustomed to, for example, control-click for right- click, but Tk doesn't appear to implement that "out of the box"; as things stand now, we developers have to implement that for each application. |
From: Neil M. <ne...@cs...> - 2004-04-24 12:11:26
|
On 24 Apr 2004, at 12:58, Cameron Laird wrote: > It sounds as though you're saying that, yes, Mac users > are accustomed to, for example, control-click for right- > click, but Tk doesn't appear to implement that "out of > the box"; as things stand now, we developers have to > implement that for each application. That *appears* to be about the size of it, yes. You think that should change, I take it? I would tend to agree with you, but I'd leave it for Jim/Daniel etc to decide, as they're the ones who would have to implement/maintain the change, and probably know more about the implications and why it isn't done like that now. Neil. |
From: Cameron L. <cl...@la...> - 2004-04-24 13:15:33
|
> From tcl...@li... Sat Apr 24 07:20:52 2004 > . > . > . > That *appears* to be about the size of it, yes. You think that should > change, I take it? I would tend to agree with you, but I'd leave it for > Jim/Daniel etc to decide, as they're the ones who would have to > implement/maintain the change, and probably know more about the > implications and why it isn't done like that now. > . > . > . I regard my Mac experience as way too limited to be making recommendations. It sounds as though we've established, though, that the right-clicking applications I'm porting to MacOS need me to do *some* "platformization" before they're fully functional. That's important to know. |
From: Benjamin R. <Ben...@ep...> - 2004-04-24 17:58:58
|
Hi Cameron, Cameron Laird <cl...@la...> writes: > [...] Mac users are accustomed to, for example, control-click for > right- click, but Tk doesn't appear to implement that "out of the > box"; as things stand now, we developers have to implement that for > each application. That's right. In Mac OS Classic, native applications just didn't do this kind of thing. There were no context menus to cater for. It would have been considered arcane and unituitive with a one-button mouse to bind to modifier+button combinations. (I actually agree, I get confused about what is what myself, when I have to use the one-button mouse.) Applications that were ported to Mac OS and insisted on using that type of UI had no precedent, so right-button emulations used (and use) different conventions. These days, the Finder has context menus and conventions for using right-clicks and on a one-button mouse it emulates it with Control+Button. Applications will probably settle on those Finder conventions in time. Besides right-click emulation there are also conventions for extending the selection, which use very similar gestures and historically may conflict with this for some applications on Mac OS. Using virtual events is of course the way to go to decouple this UI decision from the implementation of actual functionality. benny |
From: Jon G. <jg...@hi...> - 2004-04-25 05:16:10
|
On Apr 24, 2004, at 1:58 PM, Benjamin Riefenstahl wrote: > In Mac OS Classic, native applications just didn't do this kind of > thing. There were no context menus to cater for. It would have been > considered arcane and unituitive with a one-button mouse to bind to > modifier+button combinations. Eh? Contextual menus, and control-clicking to get them, significantly predate OS X. > These days, the Finder has context menus and conventions for using > right-clicks and on a one-button mouse it emulates it with > Control+Button. Applications will probably settle on those Finder > conventions in time. It's not a Finder convention. It's a HIG stipulation and has been for a very long time. > Using virtual events is of course the way to go to decouple this UI > decision from the implementation of actual functionality. Which is the effective purpose of the old IsShowContextualMenuClick and the new IsShowContextualMenuEvent. |
From: Benjamin R. <Ben...@ep...> - 2004-04-25 14:10:09
|
Hi Jon, Jon Guyer <jg...@hi...> writes: > Eh? Contextual menus, and control-clicking to get them, > significantly predate OS X. I thought somebody would catch me on that ;-). Yes context menus exist since some version before Mac OS X. Anyway, most Mac users that I know of are not aware of them or use them. > It's not a Finder convention. It's a HIG stipulation and has been > for a very long time. Users don't read the HIG (even lots of developers don't). Also if the HIG should differ from actual applications, the actual applications set the precedence. benny |
From: <gag...@ma...> - 2004-04-25 15:49:21
|
Mac OS 8! Le 04-04-25, =E0 10:06, Benjamin Riefenstahl a =E9crit : > > I thought somebody would catch me on that ;-). Yes context menus > exist since some version before Mac OS X. Anyway, most Mac users that > I know of are not aware of them or use them.= |
From: Jim I. <ji...@ap...> - 2004-04-26 18:09:38
|
One other thing to note, just to add complexity to the issue, is that=20 on a three-button mouse Control-Click and the Right Mouse button are=20 separate buttons, though as Jon points out they are both Contextual=20 Menu events... So at the base level, I think it would be better to=20 keep them separate events to Tcl. I have even seen some graphics=20 programs (I think one version of Painter, IIRC) which treats the two=20 differently - though I think somebody's feet hairs are probably=20 beginning to scorch for that... Jim On Apr 25, 2004, at 8:46 AM, J=E9r=F4me Gagnon-Voyer wrote: > Mac OS 8! > Le 04-04-25, =E0 10:06, Benjamin Riefenstahl a =E9crit : > >> >> I thought somebody would catch me on that ;-). Yes context menus >> exist since some version before Mac OS X. Anyway, most Mac users = that >> I know of are not aware of them or use them. > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > -- Jim Ingham ji...@ap... Developer Tools Apple Computer |
From: Jon G. <jg...@hi...> - 2004-04-25 21:44:41
|
On Apr 25, 2004, at 10:06 AM, Benjamin Riefenstahl wrote: > I thought somebody would catch me on that ;-). Yes context menus > exist since some version before Mac OS X. Anyway, most Mac users that > I know of are not aware of them or use them. Sounds like you need to hang out with a better class of Mac users 8^) > Users don't read the HIG (even lots of developers don't). I believe, since Vatican II, that the former group is no longer=20 relegated to limbo, but the latter is most assuredly destined for hell. > Also if the > HIG should differ from actual applications, the actual applications > set the precedence. Sounds like Windoze. 8^) Standards are Good Thing=99. I agree that there are some cases not=20 well-addressed by the HIG, but control-click/contextual-menus aren't=20 one of them. |
From: <gag...@ma...> - 2004-04-24 17:05:24
|
Same problem here with aMSN I changed manually all Button 3 for Button 2 and all Button3 for=20 Button2. (With virtual events) if {![catch {tk windowingsystem} wsystem] && $wsystem =3D=3D = "aqua"} { event add <<Button1>> <Button1-ButtonRelease> event add <<Button2>> <Button3-ButtonRelease> event add <<Button3>> <Control-ButtonRelease> event add <<Button3>> <Button2-ButtonRelease> event add <<Escape>> <Command-w> } else { event add <<Button1>> <Button1-ButtonRelease> event add <<Button2>> <Button2-ButtonRelease> event add <<Button3>> <Button3-ButtonRelease> event add <<Escape>> <Escape> } Le 04-04-24, =E0 06:56, Neil Madden a =E9crit : > A related question: I have a 3-button mouse which I use with os x.=20 > However, the right mouse button gets delivered as <Button-2> and the=20= > middle as <Button-3>, which is different to how most apps bind to=20 > right and middle mouse button normally. I've been told that this is=20 > just a misconfiguration of my mouse somewhere, but I'm not so sure -=20= > the right mouse button acts correctly in every application other than=20= > Tk-based ones. > > Anyone have any clues? If it is a misconfiguration - anyone know where=20= > to correct it?= |
From: Alastair D. <ala...@si...> - 2005-03-21 17:56:53
|
Same for me too: I have a two-button + wheel mouse that I can use with a Windows PC and a MacOS X system. It generates a <Button-2> event for a right-click and a <Button-3> event for a click of the wheel when used on MacOS X, and vice versa when used on Windows. This seems gratuitously different. Is it too late to change? Regards, Alastair -----Original Message----- From: J=E9r=F4me Gagnon-Voyer Sent: 24 April 2004 18:05 Subject: Re: [MACTCL] Right-click Same problem here with aMSN I changed manually all Button 3 for Button 2 and all Button3 for=20 Button2. (With virtual events) Le 04-04-24, =E0 06:56, Neil Madden a =E9crit : > A related question: I have a 3-button mouse which I use with os x. > However, the right mouse button gets delivered as <Button-2> and the=20 > middle as <Button-3>, which is different to how most apps bind to=20 > right and middle mouse button normally. I've been told that this is=20 > just a misconfiguration of my mouse somewhere, but I'm not so sure -=20 > the right mouse button acts correctly in every application other than=20 > Tk-based ones. > > Anyone have any clues? If it is a misconfiguration - anyone know where > to correct it? |
From: Jim I. <ji...@ap...> - 2005-03-21 18:55:05
|
The Tk Aqua code just reports the button number that the system =20 sends. On Aqua, right mouse button always sends button 2, since that =20= way you get the same button number for right mouse click for a two =20 and a three button mouse. Then if you have a third button, that =20 sends 3. Not sure I want to change this, though it would be easy enough to do... Jim On Mar 21, 2005, at 9:56 AM, Alastair Davies wrote: > > Same for me too: I have a two-button + wheel mouse that I can use =20 > with a > Windows PC and a MacOS X system. It generates a <Button-2> event =20 > for a > right-click and a <Button-3> event for a click of the wheel when =20 > used on > MacOS X, and vice versa when used on Windows. This seems gratuitously > different. Is it too late to change? > > Regards, > Alastair > > > -----Original Message----- > From: J=E9r=F4me Gagnon-Voyer > Sent: 24 April 2004 18:05 > Subject: Re: [MACTCL] Right-click > > > Same problem here with aMSN > > I changed manually all Button 3 for Button 2 and all Button3 for > Button2. (With virtual events) > > Le 04-04-24, =E0 06:56, Neil Madden a =E9crit : > > >> A related question: I have a 3-button mouse which I use with os x. >> However, the right mouse button gets delivered as <Button-2> and the >> middle as <Button-3>, which is different to how most apps bind to >> right and middle mouse button normally. I've been told that this is >> just a misconfiguration of my mouse somewhere, but I'm not so sure - >> the right mouse button acts correctly in every application other than >> Tk-based ones. >> >> Anyone have any clues? If it is a misconfiguration - anyone know =20 >> where >> to correct it? >> > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real =20 > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > |
From: Alastair D. <ala...@si...> - 2005-03-21 20:01:08
|
From the point-of-view of developers of cross-platform applications, = this particular difference feels unnecessary. =20 Windows and Linux Tk both always call the right button <Button-3> = whether or not there are actually three mouse buttons. Aqua Tk always calls the = right button <Button-2>. We wouldn't lose consistency in adopting the same convention as Windows and Linux, but we would simplify cross-platform scripting. Otherwise, it just means that there must be another test of [tk windowingsystem] to accommodate this. (Obviously, there are plenty of = these already, but most of them do actually handle genuine platform differences...) All in my humble opinion of course :-) Best wishes, Alastair -----Original Message----- From: Jim Ingham Sent: 21 March 2005 18:55 Subject: Re: [MACTCL] Right-click The Tk Aqua code just reports the button number that the system =20 sends. On Aqua, right mouse button always sends button 2, since that =20 way you get the same button number for right mouse click for a two =20 and a three button mouse. Then if you have a third button, that =20 sends 3. Not sure I want to change this, though it would be easy enough to do... Jim On Mar 21, 2005, at 9:56 AM, Alastair Davies wrote: > > Same for me too: I have a two-button + wheel mouse that I can use with = a > Windows PC and a MacOS X system. It generates a <Button-2> event for = a > right-click and a <Button-3> event for a click of the wheel when used = on > MacOS X, and vice versa when used on Windows. This seems gratuitously > different. Is it too late to change? > > Regards, > Alastair > > > -----Original Message----- > From: J=E9r=F4me Gagnon-Voyer > Sent: 24 April 2004 18:05 > Subject: Re: [MACTCL] Right-click > > > Same problem here with aMSN > > I changed manually all Button 3 for Button 2 and all Button3 for=20 > Button2. (With virtual events) > > Le 04-04-24, =E0 06:56, Neil Madden a =E9crit : > > >> A related question: I have a 3-button mouse which I use with os x.=20 >> However, the right mouse button gets delivered as <Button-2> and the=20 >> middle as <Button-3>, which is different to how most apps bind to=20 >> right and middle mouse button normally. I've been told that this is=20 >> just a misconfiguration of my mouse somewhere, but I'm not so sure -=20 >> the right mouse button acts correctly in every application other than = >> Tk-based ones. >> >> Anyone have any clues? If it is a misconfiguration - anyone know >> where to correct it? >> |