Like in the tittle : I'm looking for the list of key codes used in
scripting from the application System Events.
I found a lot of lower case characters code by myself, but was unable to
retrieve codes for capitals, and no more for special keys (but 36 = LF
or CR, I guess). Anyway it seems that thosse "key codes" don't deal at
all with Ascii codes. I'm lost.
Searching with Google or on Apple's developpers site didn't help
Somebody to give a link ?
Many thanks in advance.
--
J. B.
> Like in the tittle : I'm looking for the list of key codes used in
> scripting from the application System Events.
http://www.manytricks.com/keycodes/
> I found a lot of lower case characters code by myself, but was unable to
> retrieve codes for capitals,
Both lower- and uppercase letters have the same key code since they
share the same key ! Modifiers do not change the key code, only the "fn"
key does since it actually emulates missing keys on the keyboard.
> and no more for special keys (but 36 = LF
> or CR, I guess).
Not exactly. LF and CR are character codes. Decimal code 36 refers to
the "return" key.
Anyway it seems that thosse "key codes" don't deal at
> all with Ascii codes. I'm lost.
Key codes are useful for non-character keys such as the arrow keys.
Otherwise, send "keystroke" instead of "key code" to System Events.
Patrick
--
Patrick Stadelmann <Patrick.S...@unine.ch>
> Like in the tittle : I'm looking for the list of key codes used in
> scripting from the application System Events.
http://www.manytricks.com/keycodes/
> I found a lot of lower case characters code by myself, but was unable to
> retrieve codes for capitals,
Both lower- and uppercase letters have the same key code since they
share the same key ! Modifiers do not change the key code, only the "fn"
key does since it actually emulates missing keys on the keyboard.
> and no more for special keys (but 36 = LF
> or CR, I guess).
Not exactly. LF and CR are character codes. Decimal code 36 refers to
the "return" key.
> Anyway it seems that thosse "key codes" don't deal at
> all with Ascii codes. I'm lost.
Key codes are useful for non-character keys such as the arrow keys.
> Patrick Stadelmann <Patrick.S...@unine.ch> wrote:
> > Like in the tittle : I'm looking for the list of key codes used in
> > scripting from the application System Events.
>
> http://www.manytricks.com/keycodes/
Thanks for the URL and the following explanations : I just now
understand that it refers to keyboard events, not the characters
mapping. Hence the modifiers keys in the dictionnary
CIT :
//key code integer : The key code(s) to be sent. May be a list.
[using command down/control down/option down/shift down] : modifiers
with which the key codes are to be entered//
> Key codes are useful for non-character keys such as the arrow keys.
> Otherwise, send "keystroke" instead of "key code" to System Events.
Ok, Thank you :-)
--
J. B.