Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for an application for mac that can allow a user to compile keyboard shortcuts and tab triggers for multiple applications, and reference them on the fly.

I'm a developer and many of the applications I use have many useful keyboard shortcuts or tab triggers, including OS X itself. The problem is, while I'm learning them all, there's no convenient method of referencing them. Sure there are webpages with lists of the shortcuts, or lists in the apps themselves, and pdfs that one can download and keep open, but all these solutions aren’t streamlined in one's workflow.

I imagine an app that lives in the menu bar, that one can enter various keyboard shortcuts etc and can be organized and searched by application, or keyword etc. That way when you're working, and you need to remember a shortcut, all you have to do is click in the menu bar and search, instead of opening and searching through a pdf or whatnot.

Any suggestions? I suppose in time I could create my own... but you know...

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I don't know if you've seen KeyCue, but it basically displays a list of shortcuts in the frontmost app when you hold command.

I've also written an AppleScript that saves text files for menu items and their shortcuts. I've never really needed it myself though — it's easier to just look up shortcuts from the menu bar.

set procs to {"TextEdit"}
repeat with proc in procs
    activate application proc
    tell application "System Events" to tell process proc
        set out to ""
        repeat with v in menu bar items 2 thru -1 of menu bar 1
            set out to out & name of v & linefeed
            repeat with w in menu items of menu 1 of v
                try
                    set nme to name of w
                    set sc to my getshortcut(proc, w)
                    if nme is not missing value and sc is not missing value then
                        set out to out & "  " & sc & "  " & nme & linefeed
                    end if
                end try
                try
                    set mi to menu items of menu 1 of w
                    set subout to "  " & name of w & linefeed
                    set appendsubout to false
                    repeat with x in mi
                        try
                            set nme to name of x
                            set sc to my getshortcut(proc, x)
                            if nme is not missing value and sc is not missing value then
                                set subout to subout & "  " & "  " & sc & "  " & nme & linefeed
                                set appendsubout to true
                            end if
                        end try
                    end repeat
                    if appendsubout then set out to out & subout
                end try
            end repeat
        end repeat
    end tell
    try
        set vers to " " & version of application proc
    on error
        set vers to ""
    end try
    do shell script "echo " & quoted form of out & " > ~/Desktop/" & quoted form of (proc & vers & ".txt")
end repeat

on getshortcut(proc, x)
    set text item delimiters to space
    set menuglyphs to text items of "2 ⇥ 3 ⇤ 4 ⌤ 9 ␣ 10 ⌦ 11 ↩ 16 ↓ 23 ⌫ 24 ← 25 ↑ 26 → 27 ⎋ 28 ⌧ 98 ⇞ 99 ⇪ 100 ← 101 → 102 ↖ 104 ↑ 105 ↘ 106 ↓ 107 ⇟ 111 F1 112 F2 113 F3 114 F4 115 F5 116 F6 117 F7 118 F8 119 F9 120 F10 121 F11 122 F12 135 F13 136 F14 137 F15 140 ⏏ 143 F16 144 F17 145 F18 146 F19"
    set cmdmods to text items of "⌘ ⇧⌘ ⌥⌘ ⌥⇧⌘ ⌃⌘ ⌃⇧⌘ ⌃⌥⌘ ⌃⌥⇧⌘ - ⇧ ⌥ ⌥⇧ ⌃ ⌃⇧ ⌃⌥ ⌃⌥⇧"
    tell application "System Events" to tell process proc
        set c to ""
        try
            set n to value of attribute "AXMenuItemCmdModifiers" of x
            set modifier to item (n + 1) of cmdmods
            if modifier is "-" then set modifier to ""
            try
                set c to (value of attribute "AXMenuItemCmdChar" of x)
                c as text
                return modifier & c
            on error
                set glyph to (value of attribute "AXMenuItemCmdGlyph" of x) as text
                repeat with i from 1 to (count menuglyphs)
                    if item i of menuglyphs is glyph then
                        return modifier & item (i + 1) of menuglyphs
                    end if
                end repeat
            end try
        end try
    end tell
    return missing value
end getshortcut
share|improve this answer
    
Thanks a bunch Lri. I'll check both of those out, however for many applications I'm thinking of, the shortcuts aren't in the menu bar. For example, in Textmate all the shortcuts and tab triggers are in bundles, and in Git, the shortcuts are defined in shell scripts. But in any case, I very much appreciate the advice. For now I'm using a note taking application called Scrawl that indeed lives in the menu bar. It's searchable, but not in any formattable way. To me it seems like a good idea for an app, no? –  stefmikhail Apr 22 '12 at 3:49
    
Ok I amend my original comment... KeyCue might just work! I didn't realize until installing it that you can setup custom shortcuts that aren’t included in the menu. There are even predefined shortcut descriptions that can be imported. So thanks a bunch my friend. This looks to be even better than I thought it could be! –  stefmikhail Apr 22 '12 at 3:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.