git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Mac OSX and gitk right-click

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jun 7, 2008, 07:20 UTC
Message-ID
<20080607072007.GB12896@spearce.org>
In-Reply-To
<3215D250-73A0-422C-B104-2BE306778271@trustbearer.com>
Thomas Harning <thomas.harning@trustbearer.com> 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.
Previous: Thomas Harning
Message 2 of 2 in “Mac OSX and gitk right-click”
  1. Thomas HarningJun 6, 2008
  2. Shawn O. PearceJun 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.