diff --git a/plover/machine/keymap.py b/plover/machine/keymap.py index 3db5f419b..9fbba16bf 100644 --- a/plover/machine/keymap.py +++ b/plover/machine/keymap.py @@ -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) diff --git a/plover/machine/procat.py b/plover/machine/procat.py index 06797a10d..59a48efd2 100644 --- a/plover/machine/procat.py +++ b/plover/machine/procat.py @@ -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