Skip to content

Commit

Permalink
#391: found some more keycodes
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@12398 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 16, 2016
1 parent 5221218 commit b558d13
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/xpra/platform/darwin/keyboard_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def get_keycode(self, client_keycode, keyname, modifiers):

#we currently assume that all key events are sent using X11 names,
#so we need to translate them to osx keys
#this list has been generated using:
#$cat /Developer/Examples/Speech/Recognition/fauxTunes/Virtual\ Key\ Code\ Mappings.txt | awk '{print " \""$1"\" : "$2$3","}'
#http://x86osx.com/bbs/c_data/pds_comment/MacintoshToolboxEssentials.pdf
KEYCODES = {
#Standardkeys
"A" : 0,
Expand Down Expand Up @@ -83,7 +82,10 @@ def get_keycode(self, client_keycode, keyname, modifiers):
"," : 43,
"." : 47,
"/" : 44,
"Delete" : 51,
"grave" : 50,
"backslash" : 42,
"BackSpace" : 51,
"Escape" : 53,
"Return" : 35,
"Tab" : 48,
"Caps_Lock" : 57,
Expand All @@ -99,8 +101,8 @@ def get_keycode(self, client_keycode, keyname, modifiers):
"KP_8" : 91,
"KP_9" : 92,
"KP_0" : 82,
"KP_Decimal" : 65,
"equal" : 81,
"KP_Decimal" : 65,
"equal" : 81,
"KP_Divide" : 75,
"KP_Multiply" : 67,
"KP_Subtract" : 78,
Expand Down Expand Up @@ -134,10 +136,18 @@ def get_keycode(self, client_keycode, keyname, modifiers):
"F13" : 105,
"F14" : 107,
"F15" : 113,
"F16" : 106,
"F17" : 64,
"F18" : 79,
"F19" : 80,
"F20" : 90,
#Modifier keys:
"Shift_L" : 56,
"Shift_R" : 60,
"Control_L" : 59,
"Control_R" : 62,
"Alt_L" : 58, #option
"Alt_R" : 61,
"Super_L" : 55, #apple
}

Expand Down

0 comments on commit b558d13

Please sign in to comment.