• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: System Events & Key Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events & Key Code


  • Subject: Re: System Events & Key Code
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 16 Sep 2015 11:01:34 +0200


Le 2015/09/16 à 05:14, Steve Mills <email@hidden> a écrit :

On Sep 15, 2015, at 18:11:11, Christopher Stone <email@hidden> wrote:

tell application "System Events"
key code 5
end tell
--> "g"

I need to convert a-zA-Z to the correct Key Codes to use with key code.

Get the free Key Codes app from the App Store, which will give you the key number for any key, no matter what the language is.

https://itunes.apple.com/us/app/key-codes/id414568915

--
Steve Mills

Are you sure of that ?

If my memory is right, the code of physical keys is dependent of the physical layout.
On a French physical keyboard, 
1rst row
esc has code 53
I don't know for F1 thru F4
F5 has code 96
F6 has code 97
I don't know for F7 thru F12 & eject

2nd row
@/# has code 10
&/1  has code 18
é/2 has code 19
"/3 has code 20
'/4 has code 21
(/5 has code 23
§/6 has code 22
è/7 has code 26
!/8 has code 28
ç/9 has code 25
à/0 has code 29
)/° has code 27
-/_ has code 24
← has code 51

3rd row
⇥ has code 9
A  (which is Q on English keyboard) has code 12
Z (which is W for you) has code 13
E has code 14
R has code 15
T has code 17
Y has code 16
U has code 32
I has code 34
O has code 31
P has code 35
^/¨ has code 33
$/* has code 30
↩︎ has code 13

4th row
⇪ has code 65536
Q (which is A for you) has code 0
S has code 1
D has code 2
F has code 3
G has code 5
H has code 4
J has code 38
K has code 40
L has code 37
M has code 41
ù/% has code 39
`/£ has code 42

5th row
⇧ has code 65535
</> has code 50
W has code 6
X has code 7
C has code 8
V has code 9
B has code 11
N has code 45
,/? has code 46
;/. has code 43
:// has code 47
=/+ has code 44
⇧ has code 65535

fn has code 65535 (Yes, like shift)
↖︎ has code 63273
⇞ has code 116
suppr has code 117
↘︎ has code 119
⇟ has code 121

▲ has code 126
◀︎ has code 123
▼ has code 125
► has code 124

numpad
☒ has code 71
= has code 81
/ has code 75
* has code 67

7 has code 89
8 has code 91
9 has code 92
- has code 78

4 has code 86
5 has code 87
6 has code 88
+ has code 69

1 has code 83
2 has code 84
3 has code 85

0 has code 82
, has code 65
⊼ has code 76



Yvan KOENIG running Yosemite 10.10.5 in French (VALLAURIS, France) mercredi 16 septembre 2015 11:00:55



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >System Events & Key Code (From: Christopher Stone <email@hidden>)
 >Re: System Events & Key Code (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Web Renderer (URL -> image)
  • Next by Date: [ANN] MovingImages updated, now with audio
  • Previous by thread: Re: System Events & Key Code
  • Next by thread: System Events & Key Code
  • Index(es):
    • Date
    • Thread