How to program the function keys

Discussion in 'OS X' started by Mosey, Aug 31, 2007.

  1. macrumors member

    Aug 30, 2007
    I'm switching from a PC to a Mac. I have a PC utility called "My Function Keys" that allows me to "program" the function keys to do a combination of keystrokes. For example, I can set up F9 to do a copy and F10 to do a paste, so I don't have to do the Ctrl-C and Ctrl-V, or I can set up F2 to type my address, etc. Is there a similar utility for the Mac? I did find some information at this link:

    Which states:

    iBook: How Programmable Function Keys Work

    This article describes the programmable function key operation for iBook and the PowerBook (FireWire) computers.

    The programmable function keys were created to help simplify common, everyday tasks performed on the computer. You can use these keys to open a browser, an email application, or any other frequently used application or server by pressing a single key.
    To set up a programmable function key, open the Keyboard control panel. Or, if the keys have not been programmed yet, simply pressing one of them brings up a dialog box that leads you to the Keyboard control panel. Apple has preprogrammed F1 through F6 with such common control functions as screen brightness, speaker volume, and so on. F7 through F12 can be programmed for your personal choices.

    To help you identify what the function keys were programmed to do, Apple includes with iBook a variety of durable stickers with preselected icons. Once the keys are programmed, you can select the stickers that will best remind you of the assigned functions.

    Note: The stickers should not be placed on the keycap itself, rather above them on the iBook case. To remove the sticker, use a fingernail or other non-abrasive tool to remove them and avoid scratching the plastics.

    The function keys F1 through F12 can be easily reset to have primary functionality. Simply open the Keyboard control panel and select Options. Then check the box that says Use F1 through F12 as Function keys.

    Note: Programmable function keys are not a feature of Mac OS X 10.0

    So, it appears the iBook will do what I'm looking for, but not the iMac!
  2. Moderator emeritus


    Jan 9, 2004
    Grand Rapids, MI, USA
    Hi, and welcome! :)

    To start off with, I think you misunderstood that knowledgebase note completely. Sorry.... that note is about quite old versions of the iBook and the Powerbook. If you look at some Apple keyboards, you'll notice that some of the function keys also have icons on them for brightness, volume, etc. On the old Apple keyboards (the white plastic / transparent ones), some of these functions had their own keys, and I think one or two of them shared maybe F13 and F14.

    If you look on an iBook or Macbook, a number of the function keys have icons like this. Several keys share on the new aluminum Apple keyboards also. It is sort of to this that this knowledgebase note refers. By default, these keyboards will do these "hardware" functions (what the icon says) when you press them. If you hold "Fn" and press them, then you get any other "software" function that the key might hold. If you want to flip this, so that you have to press fn to get the "hardware function," then you can do this in Sys Prefs -> Keyboard & Mouse -> Keyboard -> Use the F1-F12...

    So this is talking about the keys on the Apple keyboards that look like the ones in this example:


    Now then... what you're asking for is something different, which is to create new software shortcuts or hotkeys that you assign to the F keys. You can do this. There are two things you can do:

    1) If the shortcut is for an item that's in the menus, e.g. Copy, Paste, etc from the Edit menu, then you can do this directly within OS X.

    To do this, go to System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts. You can change several hotkeys here by finding them in the list and then clicking on the key assigned and typing in a new one.

    You can also add any menu item from most programs. To do this, you go to the bottom, and add an entry for the program in question or for all programs. In the menu title box, you put in exactly what the menu text of the item is. For instance, you can put in Copy as the text, define a hotkey such as a function key, and do this for all applications. You'll have to restart the application in question (or logout / login); when you do, you'll notice the menu item also now shows your shortcut instead of any previously existing one.

    Here's an example I did just for you, to show you. :)


    2) If you want something more advanced than that, e.g. something for which there is no specific menu item associated, to run a program, or to do some other function, then you may wish to explore some programs like these:

    Global Hotkey

    Does any of that make sense? :)
  3. thread starter macrumors member

    Aug 30, 2007
    Mohan, Yes, it does make sense. Thanks for all the info, I can't wait to get home and try this (I'm at work now, I know - I'm supposed to be working!).

    Let me make sure I understand your example. You have set it up so when you press the F11 key, it will do a "Copy" and copy the selected text into a buffer so it can be pasted later, that is the same thing as if you press Command-C. Is that right? So, I can use this same procedure to make, say F12, do a "Paste" that does the same thing as pressing Command-V? If so, then this is what I'm looking for. I would like to do this for MS Word, TextEdit, etc.

    I'll take a look at Global Hotkey and AliasKeys. I also came across a utility called SimpleKeys

  4. macrumors G5


    Nov 25, 2005
    Just don't go overboard and change standard things. Like F11 and F12 for Copy and Paste might sound cool, but it means that if anybody uses your Mac, it won't work for them. Especially if something goes wrong with your Mac, and you ask someone for help, it's not good if that person wastes their time because things don't work as expected.
  5. Moderator emeritus


    Jan 9, 2004
    Grand Rapids, MI, USA
    So the idea is that this should impact basically any program as long as it has Copy Paste etc items in its menus. If the program for some reason didn't have an Edit menu with these items in it, it wouldn't do anything. If you select "all applications," it will make the change for every program. There might be one or two "evil" programs that ignore the change for some reason. However, all the Apple applications like Safari and TextEdit are fine, I also tested Firefox and MS Office and they both also respect the changes. So if you make the change for Copy or Paste, for instance, that change should more or less apply to every program. Again, programs won't change until they've been restarted (including Finder itself), so the best way is to make the changes in prefs, and then log out and back in. :)

    As for making weird changes that will mess other people up, that's up to you to figure out if it makes sense or not. You can certainly also create a guest account, which will have its own preferences and leave it as "normal," I think.
  6. macrumors regular

    Mar 8, 2008
    Please accept my apologies for fishing back an old topic.

    My question is, how do you chang the hardware function keys? I have the latest MBP and expose is now gone from the keyboard and I would like to replace dashboard shortcut with expose.

  7. macrumors regular

    Sep 29, 2009
    Burlington Ontario Canada
    i also have the latest macbook pro and if expose is what i think it is then its the key right beside the dashboard meter.. the one with the squares inside it..

Share This Page