[GRASS-dev] Re: [GRASS GIS] #1187: TclTk digitizer does not recognize right-click

GRASS GIS trac at osgeo.org
Mon Nov 29 16:09:55 EST 2010


#1187: TclTk digitizer does not recognize right-click
---------------------------------------------+------------------------------
 Reporter:  cmbarton                         |       Owner:  grass-dev@…              
     Type:  defect                           |      Status:  new                      
 Priority:  critical                         |   Milestone:  6.4.1                    
Component:  Tcl/Tk                           |     Version:  6.4.0                    
 Keywords:  digitizer, v.digit, right-click  |    Platform:  MacOSX                   
      Cpu:  OSX/Intel                        |  
---------------------------------------------+------------------------------

Comment(by cmbarton):

 Wait a minute. It sort of works. Still raises an error, but now if I do an
 option-left-click, it registers as a right-click. Right-click is
 registering as a middle-click. This is after changing your code to the
 following:


 {{{
     # Requested by issue #1187
     if {[tk windowingsystem] eq "aqua"} {

                 # right-click is acting like a middle-click...
                 bind .screen.canvas <ButtonPress> {
                         if { %b == 3 } {
                                 c_update_tool %x %y 2
                         } else {
                                 c_update_tool %x %y %b
                         }
                 }
                 # option + left-click for Mac equals middle-click
                 bind .screen.canvas <Option-ButtonPress-1> { c_update_tool
 %x %y 3 }
         } else {
                 bind .screen.canvas <ButtonPress> { c_update_tool %x %y %b
 }
         }

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1187#comment:10>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list