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

10.3: Assign unassignable keys to Exposť Desktop

If you use a laptop computer, the function keys which are normally used as hot keys for Exposť are very far from the track pad, making them awkward to use. The modifier keys are special, and I didn't want to use them for Exposť. However, there is one key I do not normally use which would be optimal for Exposť: the Enter key (bewtween the right Apple Key and the cursor keys). Digging around, I found the following file:

 ~/Library/Preferences/com.apple.symbolichotkeys.plist

This file contains the keycodes for the keys used in Exposť: F9=101, F10=109, and F11=103 are the keycodes for the normal function keys. Note that each keycode appears twice in the file -- once for the normal version, and once for the shifted, slow-mo version.

The integer in the next line after the Keycode encodes the modifier key for the hot key (I hope I got these right):

  • 0 = no modifier
  • 131072 = Shift
  • 262144 = Control
  • 524288 = Option
  • 1048576 = Apple

Multiple modifiers can be specified by adding these values together. If you want to use modifier keys only, the entries in this file will look somewhat different; you can do your own experimenting to find out what to use...

In order to find the key codes, I downloaded a small application that prints the keycode for each pressed key.

In order for your changes to take effect, you need to log out and back in again. If you open the Exposť Preference Panel, your changes will of course be lost. BTW, the Enter key has key code 52!

[robg adds: I have not experimented with editing this file by hand, so I can't confirm that this one works (but it should, based on similar hints involving the keyboard keys and plist files). The above description assumes a fair bit of knowledge regarding reading and editing plist files, if you have questions, just post them as comments...]
    •    
  • Currently 2.50 / 5
  You rated: 2 / 5 (8 votes cast)
 
[28,486 views]  

10.3: Assign unassignable keys to Exposť | 16 comments | Create New Account
Click here to return to the '10.3: Assign unassignable keys to Exposť' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Assign unassignable keys to Exposť
Authored by: theNonsuch on Jan 06, '04 10:41:59AM

YES! That totally worked just fine for me. I downloaded the key codes application and remapped the expose all, application, and desktop modes to control + comma, control + period, and control + slash respectively, and it worked just fine.

What I did first is I set Expose up in the System preferences with the control modifier key added (hold down control when the key selection menu is open). I then edited the file and changed the existing key codes for f9, f10, and f11 to the new key codes.

The one gotcha is that the key assignments in the plist are NOT in order; at least they weren't in mine. The order for me was all, application, shift-all, shift-application, desktop, shift-desktop.

Thank you so much for this hint - this finally remedies one of the biggest reasons I don't use Expose.



[ Reply to This | # ]
Must Create symbolichotkeys.plist File First
Authored by: OneTrueDabe on Jan 06, '04 09:50:32PM
One thing to point out, if you haven't changed your Exposť settings already,
you won't have a "com.apple.symbolichotkeys.plist" file.

Simple solution:

  1. Open System Preferences > Exposť
  2. Change any setting
  3. Then you'll be able to edit the aforementioned file.


[ Reply to This | # ]
Must Create symbolichotkeys.plist File First
Authored by: sharakan on Jan 07, '04 08:06:53AM

I found that my symbolichotkeys file didn't include kecodes for all three function keys. It was also dated October 28th. Modifying the exposť preferences fixed that for me.



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: liquidrobot on Jan 06, '04 11:35:00PM

Excellent post, thank you...

Beyond Exposť, and on the same topic, a lot of us powerbook users are fending for a simple keyboard settings option that Apple has mysteriously failed to bring forward from OS 9:

The ability to invert the function key behavior, so that the function keys work as function keys UNTIL you use the 'Fn' key. I need function keys more often than i need to adjust the screen brightness.

Is there a similar pref file that we could edit to regain this feature? You used to be able to boot into classic and set the option (making me think it might not be a simple preference edit).

I have been searching for a way to do it without running an additional app.



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: stk on Jan 07, '04 08:30:07AM

The lastest version of uControl gives you this option back (only works on 10.3). I couldn't work without it.

http://gnufoo.org/ucontrol/



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: ether on Mar 19, '04 12:55:22PM

Reports are that 10.3.3 adds this feature back.



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: raider on Apr 26, '04 11:43:00PM

It does. Under the "keyboard" preferences, there is a checkbox for:

"Use F1-F12 keys for custom actions"

That does the trick.



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: Anidel on Jan 07, '04 12:21:26PM

Be ware anyway that that Enter key is different from the Enter/Return key.
When sending, for example, SMSes via Address Book the latter will create a new line, while the former will press the Send button.

---
Anidel



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: twalkabout on Jan 12, '04 05:00:11PM

Awesome hint! This makes exposť so much more useable on a powerbook. Plus I finally have a use for that freakin' enter key! Anybody remember the original Titanium Powerbook, on the right side of the space bar there was the enter key in place of the apple key! At least they got rid of that quickly, as opposed to some other apple design blunders...

I set it up for the enter key as show all and apple-enter as show desktop. This is good for right-handed use. I'll have to figure out another easy reachable combo for show all app windows.

I did have to read through the hint a couple times to figure it out, so I thought I would help try to explain. When you look through that plist, each section starts with a key, I think this is the coding:

Key - Exposť function
32 - Show all windows
33 - Show application windows
34 - Show desktop
35 - Slow motion show application windows
36 - Slow motion show all windows
37 - Slow motion show desktop
38-49: ?? I don't know -- the key codes indicate this is for y, shift-y etc.

For example, here is the show desktop, when changed to apple-enter:

<key>34</key>
<dict>
<key>enabled</key>
<true/>
<key>value</key>
<dict>
<key>parameters</key>
<array>
<integer>-1</integer>
<integer>52</integer>
<integer>131072</integer>
</array>
<key>type</key>
<string>standard</string>
</dict>

Hope this helps. Thanks again reg!



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: ptere on Apr 24, '04 07:29:35AM

Please provide an example of how to modify "Enter" key to "Show windows".
Thanks, I'm new and see the value of having this option, and that of "Apple+Enter" for "Show desktop" on my PowerBook.



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: ianstanley on Jan 14, '04 08:03:17AM

It appears that this file does not exist until you change one or more or the settings - even if you then change it back again.

PS anybody know of a way of assigning keycodes to other keys. I use a powerbook and have a apple bluetooth keyboard left in the office in order to increase the life of the powerbook's keyboard [it's also a lot better to type on] -- What I want to do is leave expose on the default settings of F9-11 but also remap F14-16 to the F9-11 keycodes so that I can use the more accessible F14-16 when I am using the external keyboard whilst still retaining the default for the powerbook for when I am at home

Mapping the keyboard to applescript would be useful too. Any ideas?



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: Adeimantus on Feb 11, '04 11:18:09PM

Does anyone have that "small application" mentioned (and linked) in the hint? I tried the link, but I get a 404 error. I found another little app, "Full Key Codes," (download) but it doesn't respond at all to F14 or F15.

FWIW, when I press F16, it reports:
ASCII: 16
KeyBoard (hex): 6A

Has anyone successfully mapped F14, F15, or F16 to any Exposť function? If so, what were the key codes you used?



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: Jon Lord on Apr 09, '04 06:59:39AM

I managed to find the Key codes for the F14 and F15 keys.

F14 = 107
F15 = 113

These both worked successfully on my computer. (Dual 800Mhz G4)

No F16 code though



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: deleted_user6 on May 03, '04 08:40:03AM

Any ideas how to change the 'enter' key (the one between the arrow keys and the right-apple key) to become delete?
It's rather anoying that one have to use "function+backspace" inorder to delete.



[ Reply to This | # ]
10.3: Assign unassignable keys to Exposť
Authored by: u2mr2os2 on Nov 21, '04 02:54:54PM
Get DoubleCommmand. It allows you to assign shift+delete to be forward delete, and I use it to assign the enter key on my laptop to be "control" so that I can do a one-handed control-click easily with my right hand. The recent verison had a preference pane to make things much easier than the older version of adding codes and modifying a text file.

[ Reply to This | # ]
Got it working with F14-F16!!!
Authored by: designbot on Jul 20, '04 04:18:20PM

After some trial and error, I finally figured this out! I couldn't find the code for F16 anywhere on the web, but here it is.

F14: 107
F15: 113
F16: 106

The thing that screwed me up is that twalkabout has the codes wrong. For some illogical reason, the correct order is this:

Key - Exposť function
32 - Show all windows (F14=107)
33 - Show application windows (F15=113)
34 - Slow motion show all windows
35 - Slow motion show application windows
36 - Show desktop (F16=106)
37 - Slow motion show desktop

Now my happy little block of three keys corresponds to my happy little block of Exposť functions, just as it should be.



[ Reply to This | # ]