Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Q] list of Key codes from System Events

1,216 views
Skip to first unread message

Joseph B

unread,
Nov 19, 2009, 4:19:22 PM11/19/09
to
Hello every body,

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.

Patrick Stadelmann

unread,
Nov 19, 2009, 6:00:01 PM11/19/09
to
In article <1j9g6z4.1roup0g1l8ggu2N%jos...@nullepart.invalid>,
jos...@nullepart.invalid (Joseph B) 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/



> 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>

Patrick Stadelmann

unread,
Nov 19, 2009, 6:01:02 PM11/19/09
to
In article <1j9g6z4.1roup0g1l8ggu2N%jos...@nullepart.invalid>,
jos...@nullepart.invalid (Joseph B) 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/



> 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.

Joseph B

unread,
Nov 19, 2009, 6:42:23 PM11/19/09
to
Hi, Patrick,

> 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.

sell...@gmail.com

unread,
Jan 26, 2016, 11:29:53 PM1/26/16
to
many keycodkes
thank you
james
http://www.frostyshavelosangeles.com
0 new messages