Keyboard shortcut for Control+F2, F, Enter

Hello,

I am trying to create a keyboard shortcut that would be available to all Applications deliveres the same result as these keystrokes:

1. Control + F2 (move focus to menu bar)

2. F (moves focus to the File menu bar menu)

3. Enter or down arrow (Displays the File menu)

WHat I am looking to do is create the Windows equivalent of alt+F (displays the contents of the File menu)

I have created a System Preferences Keyboard Shortcut for All Applications that has "File" as the description and ^F has the Shortcut...this doesn't work. Is there a way to assign a shortcut to display the menu bar File menu in its open state?

Intel iMac, Mac OS X (10.4.11)

Posted on Dec 9, 2007 11:46 AM

Reply
7 replies

Dec 10, 2007 11:13 AM in response to ReidRik_Von

ReidRik_Von

Here's one approach to try...

1) Open System Preferences > Universal Access and make sure "Enable access for assistive devices" is checked.

2) Highlight and copy the block of code below and paste it into your AppleScript Script Editor (located inside your Applications > AppleScript folder):

*tell application "System Events"*
*keystroke tab using command down*
*set theApp to name of (first process whose frontmost is true)*
*tell process theApp*
*click menu bar item "File" of menu bar 1*
*end tell*
*end tell*

Choose Save As from the Script Editor's File menu, File Format: application, leaving the Options unchecked. Give the script application a name (Display File Menu, e.g.), and press Save.

3) To assign a keyboard shortcut, you might consider downloading and installing the excellent Spark program.

From Spark's File menu, set up a New Hot Key to launch an Application, in this case the application being your newly created AppleScript application. When the new System HotKey sheet drops down, hit the Choose button and navigate to the location where your new AppleScript application was saved. Select it and press Open. Click inside the editable Shortcut field to make it active, and on your keyboard keystroke Option (alt), plus the letter "f." Then press Create.

Start the Spark Daemon by selecting it from the File menu, or by pressing the Stark Spark Daemon button on the Spark panel itself, and then quit Spark altogether. The Spark Daemon and your enabled keyboard shortcut will run as a hidden process, using a minimal amount of RAM.

It worked for me...

Good luck!

Regards, Andrew99

Dec 11, 2007 12:39 AM in response to Andrew99

Andrew99,

Thank you so much for your detailed response. Yes what you outlined absolutely does work! I went and used this script to create a shortcut for all of the main menu bar menus (Edit, View, Tools, etc.).

The only thing that I am noticing is that there is a bit of delay until the script actually runs and opens the various menu items. I am guessing it is 2-3 seconds on my wifes 1.8 intel iMac. I am going to leave this open to see if anyone has any other suggestions.

THx again!

~Von

Jan 19, 2008 10:50 AM in response to Andrew99

I made a slight alteration to this script that has it performing better:

tell application "System Events"
set theApp to name of (first process whose frontmost is true)
tell process theApp
click menu bar item "File" of menu bar 1
end tell
end tell

THe edit was to remove "keystroke tab using command down" from the second line as this often on first use (executed from Spark) would display the File menu of the app immediately behind the current app. Without this line in the script the File menu of the current app is displayed.

THx again Andrew99

~Von

BTW, this is working in both Tiger and Leopard.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Keyboard shortcut for Control+F2, F, Enter

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.