From e1b476322c64a2c4124383fdd62691300e77d3ec Mon Sep 17 00:00:00 2001 From: Ted Morin Date: Mon, 26 Sep 2016 17:27:29 -0400 Subject: [PATCH] machine/procat: don't send empty string as key --- plover/machine/keymap.py | 2 +- plover/machine/procat.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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