summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Holland <william.holland@codethink.co.uk>2015-06-01 13:42:07 +0100
committerWilliam Holland <william.holland@codethink.co.uk>2015-06-01 13:42:07 +0100
commit0f5c2a246768adabf111fdbd287deff3b6fb630c (patch)
tree1a4338dd73bd8e037a56e83331453bddb7ae1a90
parent0c1ffa2b28d907ef71b05eb3777108116955314c (diff)
downloadkeyboard-python-0f5c2a246768adabf111fdbd287deff3b6fb630c.tar.bz2
Remove unnessesary .keys()
I have learned that if you say 'if foo in my_dict:' then it will implicitly look at keys
-rw-r--r--keyboardpython/key.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keyboardpython/key.py b/keyboardpython/key.py
index 47698db..278668d 100644
--- a/keyboardpython/key.py
+++ b/keyboardpython/key.py
@@ -219,7 +219,7 @@ def parse_code(code):
_escape_O_codes)
if not key_comb: key_comb = KeyCombination('O',ALT)
else: key_comb = KeyCombination(char,ALT)
- elif char in _special_chars.keys():
+ elif char in _special_chars:
key_comb = _special_chars[char]
elif _is_ctrl_alpha(char): key_comb = _get_ctrl_alpha(char)
else: key_comb = KeyCombination(char)