Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#2809 closed bug (WontFix)

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

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

Description

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

Change History (5)

comment:1 by Calum, 9 years ago

Resolution: WontFix
Status: newclosed

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

https://support.apple.com/kb/PH18768

comment:2 by Viktor Sergiienko, 9 years ago

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 by Calum, 9 years ago

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:

http://stackoverflow.com/q/9171613/175584

http://apple.stackexchange.com/q/41201

comment:4 by Viktor Sergiienko, 9 years ago

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: ui_platform.py 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 9 years ago by Viktor Sergiienko (previous) (diff)

comment:5 by Calum, 8 years ago

Milestone: 1.3.x

Milestone deleted

Note: See TracTickets for help on using tickets.