Reference of non alphanumeric keys in AppleScript (keyboard)

Hi everybody,

how do I address non alphanumeric keys in Applescript. For example the keycombo Command + Arrow left or Command + Arrow down (pg dn on my iBook keyboard). Is there a reference for such keys on the net.
Thanks for your help.




I have Key Codes -

For the page down key on my PowerBook it shows (among other things) “Key Code: 125 / 0x7d” What you would need in this case is “125”

tell application "Safari" to activate
tell application "System Events" to tell process "Safari" to key code 125 using command down

There is also Full Key Codes -

And there are sites that have charts of the codes, but I can’t find the links I thought I saved.

Hope that helps.



thank you so much. Your code works perfectly.

Nochmals vielen Dank.




You may get


I was given the info on this forum so it’s normal to give you access to it;-)

Yvan KOENIG (from FRANCE jeudi 26 octobre 2006 20:23:45)

I know this isn’t free, but if you’re doing UI scripting, Prefab’s UI Browser is a very handy utility, and one of the things it has built-in is the Keystroke and Key Code references.

Every time I do a UI project I find Prefab’s UI Browser very helpful.