Skip to content

Commit

Permalink
Issue pyatom#73: Added '<space>' and '<esc>' support.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpichlin committed Jul 28, 2014
1 parent 98d8e0f commit d4c8e57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions atomac/AXKeyCodeConstants.py
Expand Up @@ -18,6 +18,7 @@
# Special keys
TAB = '<tab>'
RETURN = '<return>'
SPACE = '<space>'
ESCAPE = '<escape>'
CAPS_LOCK = '<capslock>'
DELETE = '<delete>'
Expand Down Expand Up @@ -167,6 +168,7 @@
'\\': 42,
'|': 42, # Pipe
TAB: 48, # Tab: Shift-Tab sent for Tab
SPACE: 49,
' ': 49, # Space

# Characters that on the US keyboard require use with Shift
Expand Down Expand Up @@ -202,6 +204,7 @@
RETURN: 36,
DELETE: 117,
TAB: 48,
SPACE: 49,
ESCAPE: 53,
CAPS_LOCK: 57,
NUM_LOCK: 71,
Expand Down
2 changes: 2 additions & 0 deletions atomac/ldtpd/keypress_actions.py
Expand Up @@ -66,6 +66,8 @@ def _get_key_value(self, keyval):
keyval="page_up"
elif keyval == "pageup":
keyval="page_up"
elif keyval == "esc":
keyval="escape"
key="<%s>" % keyval
# This will identify Modifiers
if key in ["<command_l>", "<command_r>",
Expand Down

0 comments on commit d4c8e57

Please sign in to comment.