Skip to content

Commit

Permalink
Merge pull request #602 from morinted/procat_fix
Browse files Browse the repository at this point in the history
machine/procat: don't send empty string as key
  • Loading branch information
benoit-pierre committed Sep 26, 2016
2 parents 5b0d859 + e1b4763 commit 9487982
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plover/machine/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_action(self, key, default=None):
def keys_to_actions(self, key_list):
action_list = []
for key in key_list:
assert key in self._keys
assert key in self._keys, "'%s' not in %s" % (key, self._keys)
action = self._bindings[key]
if 'no-op' != action:
action_list.append(action)
Expand Down
4 changes: 3 additions & 1 deletion plover/machine/procat.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def process_steno_packet(raw):
for i, b in enumerate(iterbytes(raw[:3])):
for j in range(0, 8):
if b & 0x80 >> j:
steno_keys.append(STENO_KEY_CHART[i * 8 + j])
key = STENO_KEY_CHART[i * 8 + j]
if key:
steno_keys.append(key)
return steno_keys


0 comments on commit 9487982

Please sign in to comment.