Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

How to map F14, F15, and F16 to Exposť, Dashboard, etc. System
This hint explains how to use the F14, F15, and F16 function keys for your own uses -- Dashboard, Exposť, etc. This procedure was tested with an Apple Pro USB keyboard connected to a PowerMac G4 MirroredDriveDoors (MDD) FW800 Dual 1.25Ghz PowerPC Mac with OS X 10.4 (Tiger). It may or may not work with other keyboards (for example PowerBooks, etc.), or with previous versions of OS X. I successfully used this method on two Apple Pro USB keyboards -- the one with 15 F-keys (original Pro keyboard) and the latest one with 16 F-keys. Essentially, you need to edit the keyboard shortcuts plist file and manually define the function keys you want to use for a particular action.

There are a couple of things you need before you can execute this process:
  1. You need a copy of the Property List Editor application, which is included in the Xcode Tools install (Xcode Tools can be downloaded from the Apple Developer Connection section of Apple's website. Alternatively, you can use PrefEdit, a free preferences editor from Marcel Bresink. This is a smaller download that having to download all of Xcode Tools to get the Apple version. [robg adds: You could also use PlistEdit Pro, a $24.95 shareware package.]

  2. You need to have a version of the com.apple.symbolichotkeys.plist file on your system. This file is located in your user's Library -> Preferences folder. If you have never altered the default hotkey settings or keyboard shortcuts (for Exposť, Dashboard, or any other preset via the Keyboard Shortcuts section of the Keyboard & Mouse preferences panel), then this file won't exist. As soon as you use the System Preferences for Dashboard/Exposť or Keyboard Shortcuts to make a change, then this file will be created (with only the entries being those of the shortcuts/hotkeys you changed which override the default settings).
Read on for the step-by-step...

I found that the easiest way to execute the changes was to access the Exposť System Preferences item and change all of the shortcuts to something else -- for example, set All Windows to F1, Application Windows to F2, Desktop to F3, and Dashboard to F4. This results in the com.apple.symbolichotkeys.plist file being created with the appropriate entries already existing (so you can just change the relevant values without having to add the whole lot!).

Note also that, if you have more than one user defined and you want the changes to apply to all those users, you will have to create and edit the com.apple.symbolichotkeys.plist file for each one (or copy the modified file to each user's Library/Preferences folder).

When you change the hotkeys to create the plist file as I mentioned above, two entries are created for each function -- one for the hotkey itself and one for the modifier key function (in this case Shift, which makes the animation go in slow motion). So you will also need to alter the modifier key entries to match the hotkey you decide to use for each function. I would suggest you do so even if you don't use slow motion mode, otherwise the modifier key definition will be left set to the 'old' key setting and I'm not sure what the consequences of this may be. You presumably could also change the modifer value to one of the other modifier keys (Control, Option or Command (Apple)). I haven't tried this, but here are the relevant modifer keys and their values if you want to try:
  • 0 = no modifier
  • 131072 = Shift
  • 262144 = Control
  • 524288 = Option
  • 1048576 = Command (Apple)
I believe if you want the modifier key to be, say, Shift-Control, then just add the two numbers together to have this combination as the modifier - i.e. Shift (131072) + Control (262144) = 393216.

The process:
  1. Make a backup of the ~/Library -> Preferences -> com.apple.symbolichotkeys.plist file, in case something goes wrong! Although if you just delete the file, then everything goes back to the default settings, but you'll obviously lose any changes you made to the default settings for any keyboard shortcuts.

  2. Fire up the Property List Editor (in /Developer -> Applications -> Utilities), or the editor you've chosen to use.

  3. Choose File: Open, and navigate to the com.apple.symbolichotkeys.plist file, select it, and click Open. In the resulting window, expand the triangle (twistie) next to Root then the triangle next to AppleSymbolicHotKeys.

  4. You will see a bunch of numbered entries, each with their own triangles. For each one you want to change, you need to click on the triangle to expand it:
    1. The number itself (i.e. 32) then...
    2. Value then...
    3. Parameters

  5. For each Parameter entry, there are three numbered entries (0, 1, 2), as seen in this screenshot. The entry you want to change for the key that is pressed to initiate the function is the entry numbered 1. You change the value by double-clicking the entry in the Value column and typing in a new key value. If you want to also change the modifier value as well as the key value, then the entry for the modifier value is the entry numbered 2 (in the modifier key number, not the activation key number section!).

  6. The relevant Exposť and Dashboard Shortcut (hotkey) numbers are:
    • All Windows = 32, All Windows Modifier = 34
    • Application Windows = 33, Application Windows Modifier = 35
    • Show Desktop = 36, Show Desktop Modifier = 37
    • Dashboard = 62, Dashboard Modifier = 63

  7. The relevant values for the F13, F14, F15, and F16 keys are:
    • F13 = 105
    • F14 = 107
    • F15 = 113
    • F16 = 106

  8. When you have changed the key value(s) for the Exposť or Dashboard function(s) you want to change, choose File: Save.

  9. Log out and login again (or restart) and test it out (I found that sometimes the changes were immediate without logging off, but sometimes they did not 'take' until a log off/restart).
I set my keys up as follows:
  • F13 = Dashboard
  • F14 = Desktop
  • F15 = Application Windows
  • F16 = All Windows
Note: After making these changes, when you go to the Keyboard Shortcuts System Preferences pane and scroll down to the Dock, Exposť, and Dashboard entries, the value shown in the Shortcut column will be a blank. Don't worry -- it's not set to nothing, it just cannot display the key (because it doesn't know about those keys). Also, when you go to the Dashboard and Exposť System Preferences Pane, if you have set F14, F15 or F16 for any of those functions, the key shown in the listbox will display as F1. Once again, don't worry; it's not actually set to F1, but it seems this Preferences pane partially 'knows' the keys.

Presumably you could also assign other functions apart from Exposť or Dashboard to the F14, F15 or F16 keys using this method. The easiest way to figure out which entry in the plist file is associated to the function you want to assign F14, F15 or F16 to would be to do this:
  1. Open the plist file with the Property List Editor and note the numbers that currently exist.
  2. Go to System preferences and select Keyboard Shortcuts and change the function you want to change to something other than its default.
  3. Open the plist file again with the Property List Editor and there should be a new numbered entry for the function you just changed via Keyboard Shortcuts.
  4. Change the value for the key pressed to the value for F14, F15 or F16 using the method described above.
It may also be possible to remap functions to the other non-standard keys on the keyboard (such as the Volume Up/Down, Mute and Eject keys) but I do not know (nor could find anywhere) what the value of these keys are. If anyone has or knows where I can find a utility for displaying the key values of a Mac keyboard when the keys are pressed, then I would be very appreciative and I will test it out...

[robg adds: I haven't tested this one ... on my machine, F13 is available as a choosable key in the lists, but F14 through F16 are not.]
    •    
  • Currently 2.60 / 5
  You rated: 4 / 5 (5 votes cast)
 
[39,936 views]  

How to map F14, F15, and F16 to Exposť, Dashboard, etc. | 13 comments | Create New Account
Click here to return to the 'How to map F14, F15, and F16 to Exposť, Dashboard, etc.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: atFault on Aug 11, '05 11:20:59AM

Very nice hint. Long, but I'm going to give it a try.

Given your experience with enabling the F14-16 keys, is there anyway to make these keys accessible in most/all applications? It seems a waste to have nicely defined keys that are easy to access that are not used ever. They would be great for photoshop, illustrator, and lots of games too.

---
Let me through, let me through, I got here late.



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: perardi on Aug 11, '05 11:27:46AM

I just tested this on a second revision 2 GHz 17-inch G5 iMac with the newer F16-style Apple keyboard.

The hint worked just as advertised. I had to remap my multi-button mouse to work with the new keys, but that worked just fine, too.



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: slaakso on Aug 11, '05 02:05:28PM

I'd like to change Exposť to F12 on Powerbook in a way that I would not have to use the Fn-button. Still I would like to maintain the Sound and Brightness buttons directly. So I would like to detach the default 'Eject' behavior from the F12. Anyone know if this is possible?



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: pauljlucas on Aug 11, '05 07:57:19PM

FWIW, I instead have the following:

F12: Expose Desktop
Command-F12: Widgets:
F11: Expose All Windows
Command-F11: Expose Application Windows

That way you don't disturb the keyboard brightness or have to use the gn key on the PowerBook.

---
- Paul



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: Alpha Centauri on Aug 11, '05 02:30:31PM

I preferred Dashboard to activate using the only key I absolutely never ever use: the one right below escape (can't type the symbol any more, it activates Dashboard...). You can get the values for almost any key with this program: http://www.prefab.com/uibrowser/ , follow the steps explained at the end of their support page ("How do I create scripts to send keyboard shortcuts?") in order to get the right keystroke value. Then simply replace the appropriate value in the symbolichotkeys file with the key code you get from UI Browser.



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: taxi on Aug 12, '05 06:23:13AM

Um, so you don't do much bash programming then. Backticks are actually quite useful - you can use them to cause a program to be executed, and the result be embedded in a more complex command.



[ Reply to This | # ]
backtick character
Authored by: sjk on Aug 13, '05 06:38:29PM

And command-` is the long-popular and convenient shortcut for cycling windows in most apps.

I normally use backticks in interactive shells but prefer using "$(...)" in scripts because they're easier to nest (and read, IMO).



[ Reply to This | # ]
F14 & F15 = Brightness on Powerbooks with External Keyboard
Authored by: emarmite on Aug 11, '05 04:01:28PM

I use a bluetooth external keyboard with my Powerbook and F14/F15 are the replacements for brightness down/up. I didn't know this until I read this tip and tried them.



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: zaj on Aug 14, '06 10:21:05PM

How do you disable the F14 or F15 key, i need it for some other hot keys?

-Z



[ Reply to This | # ]
Changes won't stick
Authored by: b00le on Oct 04, '07 03:50:20AM

I recently started having a problem with this: it won't stick. I keep a copy of the modified prefs file and copy it into the prefs folder, restart and it works for a while, but every few days I have to do it again. Repaired permissions, looked for other conflicting prefs files, even tried locking the file with no success. (The non-working prefs file has the right settings; the system just doesn't use them. Replacing it seems to do something...)



[ Reply to This | # ]
How to map F14, F15, and F16 to Exposť, Dashboard, etc.
Authored by: zeichensprecher on Feb 06, '08 02:05:22AM

The new Keyboard Preferences now contain a "Dock, Exposť and Dashboard" setting (in the Shortcuts Tab).
You can assign very simply any Key you like.



[ Reply to This | # ]
Solution: In System Preferences, Keyboard Shortcuts, under "Display" uncheck both items
Authored by: Alex Quinn on Feb 21, '09 08:50:58PM

Just for the record.... The solution was to go into the Keyboard Shortcuts in the System Preferences and, under Display, uncheck the entries for increasing/decreasing brightness.

I found that in the QuicKeys FAQ. I'm not actually using QuicKeys, but I'm pretty sure it's the same problem. Until you do what I've described here, it seems that nothing else in the system can detect that F14 and F15 have been pressed. There's also some great info on Mac keyboard remapping at Jacob Rus' page on the Cocoa Text System.

I know this is an old post, but I wasted a bunch of time trying to solve this tonight, finding a lot of forum threads like this with the same question, but no satisfactory answer, so I thought I'd go back and fill in the answer for the next person who finds this page.



[ Reply to This | # ]
Spaces hotkey names
Authored by: n[ate]vw on Mar 06, '10 05:04:06PM
For Spaces, the relevant shortcut/hotkey numbers are 75 and 76. I needed to use that one for feature I'm adding to Sesamouse, so I thought I'd share here since this post was so helpful.

[ Reply to This | # ]