Xkeys Manual
This is the documentation for Xkeys. To get to the main site, click here.
Introduction
Xkeys allows you to launch applications and open files and folders just by pressing a function key. This was a feature of Mac OS 9, but Apple neglected Function keys can also have submenus, duplicating the functionality of Fkey Expander. Xkeys can be put on standby by pressing command and a function key. (Reactivate with the same shortcut.) This is useful if you want to use an application that uses the function keys for its own purposes. (Like REALbasic or Jedi Knight II, to name two examples.)
Setting It Up
When first launching Xkeys you will be presented with a dialogue asking you to specify the type of keyboard you have. The three options are:
Apple Extended Keyboard - Also called Apple Pro Keyboard, this ships with all desktop Macs nowadays. It has three blocks of keys and a total of fifteen function keys, of which all but F12 can be used freely. (F12 is the eject button.)
Apple USB Keyboard - This is the smaller and older cousin of the one above. It has only two blocks of keys, and its function keys only go up to F12.
Laptop Keyboard - On the newer Macintosh laptops - the iBook and the Titanium powerbook, the function keys F1 to F6 are used for controlling such things as volume and screen brightness. To use them normally you have to press the fn key in the lower left corner simultaneously.
Once you have chosen your keyboard you will be presented with the main configuration window. There you can choose to activate or deactivate Xkeys and set the items to be opened when certain function keys are pressed. Note that the application Xkeys does not have to be running in order for the function keys to work.
In the pull-down menu after "When the ", you can select the function key whose function you'd like to define. Below there are four radio buttons:
do nothing - This is the default setting. It's rather self-explanatory: as long as this is selected, Xkeys won't do a thing when you press the function key you selected in the pull-down menu.
launch the file/application - Use this option to make Xkeys open a file or launch an application when the selected function key is pressed. You you can specify the file/application with the "select" button. NOTE: If you select a compiled or text-format applescript, Xkeys will not open the script in the editor but instead execute it. This new feature of Xkeys 1.1 is very useful for automating a variety of tasks.
open the folder - Use this option to make Xkeys show a folder in the Finder when the selected function key is pressed. You you can specify the folder with the "select" button.
open/launch several items - This option allows you to launch several items with one hotkey. You can specify the list of items to be launched by pressing on the "edit list" button next to the option.
display submenu - When you select this radio button, the greyed-out area below becomes active. With this option selected, Xkeys will present a menu of choices when you press the selected function key. The applications/files/folders in the menu can be opened by pressing another function key. If, for example, you set F1 to display a submenu, and F1 in the submenu to launch the Calculator, then pressing F1 twice in sequence will launch the Calculator. The grey area is almost a duplicate of the options above, except for that the submenu option is missing. (This is a limitation, yes, but it still leaves you with something between 121 and 225 items that can be launched with two keystrokes.)
Note that Xkeys supports Drag & Drop, so you can simply drag the items you wish to open into the Xkeys window. (Drag items for the submenu into the submenu area.)
The changes you make to the Xkeys settings in the main window take effect immediately.
Advanced Options
When you select "Preferences..." from the Xkeys menu you are presented with another, more advanced set of options.
(Note that in versions prior to version 1.1, you could set the reaction speed in the preferences. This option has been removed because Xkeys now uses a different mechanism to "listen" for hotkeys.)
Keyboard Type - This is essentially the same set of options that Xkeys gives you when you start it up the first time. Here you can change the type of keyboard Xkeys should deal with. Useful if you selected the wrong one at the start or have since gotten another one.
Hotkey Modifiers - Here you can specify which additional keys have to be pressed for the hotkeys to work. The reason this option is available that several applications use the function keys for their own purposes. Having to press a modifier key circumvents such conflicts with other applications. NOTE: Take care not to select modifier keys that conflict with the standby option. Alternatively, turn that option off. NOTE: On laptop keyboards, make sure to press the modifier before pressing fn. Otherwise the hotkey won't react. If you find this annoying, consider the option outlined in the FAQ.
can put Xkeys on standby using command-any Fkey - Xkeys can be put on standby by pressing a shortcut of your choice. You can set the shortcut by clicking on the button it's written on. If for some reason you don't want this feature you can deactivate it here.
Troubleshooting / Frequently Anticipated Questions
Q: I have a laptop, but I really want to be able to use the F1-6 keys without having to press fn.
A: Boot into Mac OS 9 (not classic, the real thing), open the Keyboard control panel and press on "Function Keys". In the window that appears, deactivate the checkbox next to "Use F1 through F12 as Hot Function Keys". F1-F6 will now function normally. In order to access their special functions (such as changing screen brightness), press fn. (Exactly the reverse behaviour from before.) Note that trying to boot into OS 9 might lead to trouble. Don't blame me.
Q: Xkeys doesn't react anymore.
A: Try the following things in sequence until the problem is solved:
1. Launch Xkeys and make sure the "Xkeys is active" checkbox is checked.
2. Toggle that checkbox off and then on again.
3. Make sure you used the correct modifier keys. (Any modifier keys are mentioned in the line starting with "When the" in Xkeys' main window.
4. Press the standby shortcut (default: command-any Fkey) to deactivate the standby mode Xkeys might be in.
5. Make sure the function key you wanted to use really is set to do something.
6. Reboot the computer and try if it works now.
7. Send me an email at feedback@zarkonnen.com and detail your problem, including the circumstances under which it happened. Include the following information:
A. Type of your computer and operating system version.
B. Use the Process Viewer (Utilities Folder) and check if the "Fkey Listener" is listed. Tell me if yes or no.
C. A copy of your Xkeys Preferences (Home:Library:Preferences:Xkeys Preferences) might also be useful.
Q: Xkeys crashed. [What do I do now?]
A: Send me an email at david.stark@swissonline.ch and detail your problem, including the circumstances under which it happened. Include the following information:
1. Most importantly, a description of what you were doing when it crashed.
2. Type of your computer and operating system version.
3. A copy of your Xkeys Preferences (Home:Library:Preferences:Xkeys Preferences.xkeys) might also be useful.
4. Any other special circumstances, strange quirks your computer exhibits, strange behaviour Xkeys exhibited before it crashed.
Q: There's this annoying beep every time I press a function key.
A: Unfortunately, quite a lot of Apple's applications (Preview, Textedit and Mail, to name a few) emit a beep when you press a function key while they're active. (Though they don't do anything else.) Xkeys has nothing to do with those beeps. It can't stop them either.
Q: How can Xkeys launch applications when it's not running?
A: Actually, the application Xkeys is only a configuration application for the "Fkey Listener", a background application that does all the work. If you go to the login items in System Preferences, you'll see it listed. (Provided Xkeys is turned on, of course.)
Q: Couldn't this background application crash and lock up the computer?
A: Under Mac OS 9 something like this could happen, but OS X has memory protection which prevents one application from taking down the whole system. If the background application were to crash (not very likely - it's been tested quite a bit) then the only thing that would happen is that the function keys would no longer launch anything.
Q: Why can't I configure some of the function keys?
A: Depending on which keyboard layout you chose, you can only configure certain function keys. F12 is the "eject" key both for laptop and Apple USB keyboards even if not labeled as such. Select the "Apple Extended Keyboard" option in the preferences to be able to configure all function keys regardless of whether you actually have them on your keyboard.
Q: How do I get rid of Xkeys again?
A: Open Xkeys, uncheck the "activate Xkeys" box, quit it, then drag it and everything related into the trash. Done. (If you're really tidy, trash the Xkeys Preferences files as well. They're in the Preferences folder of the Library in your home folder.)
Information about Xkeys
Xkeys was written with REALbasic 4.5.2. It actually consists of two applications: Xkeys and Fkey Listener, the first being a configuration application, the second an interface element. (Meaning: it doesn't show up in the dock.) Fkey Listener is hidden away in the Xkeys bundle.
Xkeys is the offspring of the Mac OS 9 function key feature and the application Fkey Expander which enhances said feature. It is freeware, in case you haven't noticed yet.
The Xkeys logo was done with Bryce 3D.
It makes use of the excellent MonkeyBread Plugin by MonkeyBreadSoftware. (http://www.monkeybreadsoftware.com/)
The bundle was made using App Bundler by Thomas Reed. (http://home.earthlink.net/~thomasreed/realbasic/)
It was extensively beta tested by Tim Lenerz (http://homepage.mac.com/timlenertz/) and Steven Schlansker (http://www.fgsoft.net). Ryk Groetchen and David Reed also supplied testing and help for later versions, especially version 1.1. They all ferreted out lots of bugs, made excellent suggestions for improvements, and gave helpful pointers on how to do things. I would also like to thank the denizens of the REALgurus webboard (http://www.realgurus.com) who were as always very helpful when I got stuck somewhere.
Legalities
Neither I, David Stark, nor anybody else mentioned assume any responsibility for anything bad that might happen as a consequence of the use of Xkeys. Anything that looks like a guarantee or commitment in fact isn't.
However, if you do have a problem with Xkeys you can of course email me (feedback@zarkonnen.com) and ask me about it. I just don't guarantee I can or will do anything about it. I most likely will, but I don't guarantee it. Legalities...