monitor: don't add multi-character keys to the filter
this avoids messing up the filter string with stuff like KEY_LEFT,
KEY_RIGHT, etc. In the medium term, it might be a good idea to use
something like the readline library for the input of the filter
string.
@@ -216,6 +216,9 @@ class Monitor(can.Listener):
elif key in ['KEY_BACKSPACE', '\b']:
self._filter = self._filter[:-1]
else:
+ # we ignore keys with more than one character here. These
+ # (mostly?) are control keys like KEY_UP, KEY_DOWN, etc.
+ if len(key) == 1:
self._filter += key
self.compile_filter()
