bugGNUstep - Bugs: bug #30051, NSUserKeyEquivalents default not...


bug #30051: NSUserKeyEquivalents default not supported

Submitter:  Doug Simons <theeggcamefirst>
Submitted:  Fri 04 Jun 2010 09:36:17 PM UTC
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Tue 08 Jun 2010 04:54:21 PM UTC, comment #1: 

I've committed a basic implementation in NSMenuItem (svn r30620). One improvement that would be nice in the future would be to combine NSUserKeyEquivalents dictionaries from different domains, to allow things like changing the key equivalent for "Quit" in the NSGlobalDomain to affect all applications, and at the same time changing other key equivalents in specific applications.

The more urgent need, however, is to update the command-line 'defaults write' command to support -dict-add and related keys for modifying an existing value that is a dictionary rather than having to replace it in its entirety.

Doug Simons <theeggcamefirst>
Fri 04 Jun 2010 09:36:17 PM UTC, original submission:  

Although this default key is not officially documented by Apple, it is a fairly well-known and useful mechanism for allowing a user to assign key equivalents to menu items.

The value of this default is a dictionary, with keys which are titles of menu items, and values which are strings of the form "@^X" (for Command-Control-X). Symbols for modifier keys include "@" for Command, "~" for Option, "$" for Shift, and "^" for Control.

I'm working on a basic implementation of this which I'll check in shortly. NSMenuItem also has some minimal support for a similar default called NSControlKeys which I'll leave in for anyone who may be using it. It would be possible to combine the two (as alternate names for the same functionality) although NSUserKeyEquivalents values may begin with the modifier symbols, which NSControlKeys don't support.

Also NSControlKeys support is disabled by default, and is only available at the global domain. I'm not sure what the intent is here, so I decided to leave it as a separate mechanism, but if others who are familiar with the history think it should be rolled together now, let me know.

Doug Simons <theeggcamefirst>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by theeggcamefirst (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-9c15.
    Corresponding source code