Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key codes for function keys



on 2003-12-11 8:58 AM, Andri Marques Moura at email@hidden wrote:

> Does anybody knows where I could find the key codes we can use in System
> Events for the fuction keys (F1, F2, F3...)?

In Cocoa (and therefore in Studio, if you know how to make the Cocoa calls),
you can get them from the NSEvent class. It contains constants for F1
through F35 (now, THAT's a keyboard I would like to see!) for distinguishing
which key was pressed by the user to generate [NSApp currentEvent], and a
'keycode' method to get the hardware-independent keycode.

If you just want to know what they are, one way to find out is to download
the trial version of PreFab UI Browser at <http://www.prefab.com/uibrowser>,
launch it, open its Keystrokes drawer, and start pressing function keys on
your keyboard. The corresponding keycodes will appear in the drawer.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.