Mac OSX and gitk right-click

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Mac OSX and gitk right-click

From: Thomas Harning <hidden>
Date: 2016-06-15 22:44:42

gitk doesn't appear to have right-click support in OSX, but  
gitgui-0.8.1 has it...

Thought I'd bring this up in case anybody has any fixes.  Currently  
digging through to see if I can make a quick fix...


-- 
Thomas Harning
TrustBearer Labs
TB OpenID: https://openid.trustbearer.com/harningt

Re: Mac OSX and gitk right-click

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:42

Thomas Harning [off-list ref] wrote:
gitk doesn't appear to have right-click support in OSX, but  
gitgui-0.8.1 has it...
That's because git-gui has this procedure

proc bind_button3 {w cmd} {
    bind $w <Any-Button-3> $cmd
    if {[is_MacOSX]} {
        # Mac OS X sends Button-2 on right click through three-button mouse,
        # or through trackpad right-clicking (two-finger touch + click).
        bind $w <Any-Button-2> $cmd
        bind $w <Control-Button-1> $cmd
    }
}

and uses it to configure the binding for the "right-click" scripts
rather than calling "bind $w <Any-Button-3> ..." directly.  gitk
does the latter, and thus fails on Mac OS X.

I actually think its a bug in Tcl/Tk on Aqua that it doesn't treat
Control-Click as a right click action, or that right mouse click
is sent as button 2, but is 3 on ever other system.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help