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.
Regards
jopa5800
Hi.
I have Key Codes - http://www.petermaurer.de/nasi.php?section=keycodes.
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 - http://www.versiontracker.com/dyn/moreinfo/macosx/21215
And there are sites that have charts of the codes, but I can’t find the links I thought I saved.
Hope that helps.
j
J,
thank you so much. Your code works perfectly.
Nochmals vielen Dank.
Regards
jopa
Hello
You may get keyboardSee.app
from
http://macgamer.macupdate.com/info.php/id/22220
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.