Adding modifier key equivs to *contextual* menus (in Safari,
so a hack..)?
Christiaan Hofman
cmhofman at gmail.com
Tue Aug 21 17:04:30 PDT 2007
On 22 Aug 2007, at 1:34 AM, Jim Witte wrote:
> I'm wondering if there is any way that key equivalents can be
> added to contextual menus (if they are showed on screen with a
> command click, instead of just temporarily with a real right-
> click). Furthermore, can anyone think of a way to insert something
> like this (if possible) into Safari (into the link contextual menu
> - I want a key-equiv for Download file to..") using an APE. True,
> it would likely break on the next Safari release, but I am NOT
> going to release this to the general public..
>
> The contextual menus aren't in Safari's nib files, which makes it
> much harder, and Safari itself looks like a Carbon app, which might
> make it harder still to find it in the code. But if it is
> something as simple as changing a string like 'Download file to' to
> 'Download file to/D', then it seems doable (but I don't know how
> the Carbon Menu Manager routines deal with multiple modifiers.
>
> Jim
>
I don't think it's Carbon, as it is based on WebKit.
Anyway, I don't think it is possible to add shortcuts to contextual
menu items in Safari, as the menus are generated dynamically from an
event rather than being associated to any view, so the menu does not
exist to compare for shortcuts. See the WebKit API, in particular
the WebUIDelegate protocol.
Christiaan
More information about the MacOSX-dev
mailing list