Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2809 closed bug (WontFix)

[Mac OS X] Support Ctrl-click to do right-click

Reported by: singalen Owned by:
Priority: minor Milestone:
Component: GTK UI Version: 1.3.12
Keywords: Mac, OSX Cc:


Otherwise it's impossible to call a context menu from a touchpad (without a mouse).

Change History (5)

comment:1 Changed 6 years ago by Cas

  • Resolution set to WontFix
  • Status changed from new to closed

Sorry won't implement this as there are already solutions e.g.

comment:2 Changed 6 years ago by singalen

Thanks, didn't know that. I wouldn't name it a "solution" though - it's rather a workaround. Ctrl-click is a generally-adopted shortcut that is comes first in search for Apple recommendations, and a double-tap has a problem: it can randomly move the cursor. I'll see if I can make a patch.

comment:3 Changed 6 years ago by Cas

The problem is that a keyboard shortcut won't be able to detect mouse position and also ctrl-click already has a function in selecting torrents...

Further info:

comment:4 Changed 6 years ago by singalen

I have good news :) Mac interfaces, including Deluge, use Cmd-click for selecting list items. And Mac doesn't have a "context menu of the current selected item" key, as that very ASE question states, so it won't be a problem.

Thanks for the reference, but that's all workarounds. Ctrl-click for context menu is so traditional for Mac apps, that Deluge is the first app I ran into that doesn't support it. Second one is a VirtualBox? guest system, but that hardly counts.

So I believe it needs to work with Ctrl-click.

I've checked the source, and only found 6 places with if event.button == 3:

I drafted a quick hack: with a wrapper class

import platform import gtk

class MouseEvent?:

""" Platform-specific workarounds. """ def init(self, gtk_event):

self.gtk_event = gtk_event self.button = gtk_event.button self.state = gtk_event.get_state()

if platform.system() == 'Darwin':

if self.button == 1 and self.state & gtk.gdk.CONTROL_MASK:

self.button = 3 self.state = gtk.gdk.CONTROL_MASK

def get_state(self):

return self.state

def getattr(self, attr):

return getattr(self.gtk_event, attr)

def event(e):

return new MouseEvent?(e)

in order to test replacement code like this: if ui_platform.event(event).button == 3:

but failed to build and run a pygtk without an X server, so I cannot provide a reliable patch 8( If I get to test it, will you accept the patch?

Sorry for broken formatting.

Last edited 6 years ago by singalen (previous) (diff)

comment:5 Changed 6 years ago by Cas

  • Milestone 1.3.x deleted

Milestone deleted

Note: See TracTickets for help on using tickets.