-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got a traceback, then stopped registering key events #30
Comments
I can reproduce this when I press a key on the numpad |
the keycodes I get in X doesnt seem to match the keycodes in the source. xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }' 90 KP_0 in https://github.com/suurjaak/InputScope/blob/master/src/inputscope/listener.py
So I seem to get a traceback for a keycode not mentioned in the src. KP_ENTER is 104 on X aparently, and 104 in src in Numpad8, and I dont get a crash. But KP_0 is 90, and that doesnt have a src mapping, and then it crashes. Or so it would appear... |
The deprecation warning will be easy to fix, and I will do so in the next release. But it looks like there is a bigger problem. Are you using Ubuntu 24? Seems that there have been a number of breaking changes, and the library used for monitoring user inputs is not compatible with the newest things, and the library author is not actively developing it any more. I'll have to set up a virtual machine with ubuntu24 and experiment. |
No Im using fedora 39. Thanks for having a look! |
The new v1.11 release should fix these issues. |
$ inputscope
/home/joakim/.local/lib/python3.12/site-packages/inputscope/webui.py:233: DeprecationWarning: The default date converter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
for e in events:
/home/joakim/.local/lib/python3.12/site-packages/inputscope/webui.py:313: DeprecationWarning: The default date converter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
for e in events:
Unhandled exception in listener callback
Traceback (most recent call last):
File "/home/joakim/.local/lib/python3.12/site-packages/pynput/_util/init.py", line 228, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/joakim/.local/lib/python3.12/site-packages/pynput/_util/xorg.py", line 470, in _handler
self._handle(self._display_stop, event)
File "/home/joakim/.local/lib/python3.12/site-packages/pynput/keyboard/_xorg.py", line 564, in _handle
self.on_press(key)
File "/home/joakim/.local/lib/python3.12/site-packages/pynput/_util/init.py", line 144, in inner
if f(*args) is False:
^^^^^^^^
File "/home/joakim/.local/lib/python3.12/site-packages/inputscope/listener.py", line 475, in
args = dict(on_press= lambda k, *a, **kw: self.on_event(True, k),
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/joakim/.local/lib/python3.12/site-packages/inputscope/listener.py", line 487, in on_event
mykey, realkey = self.extract(key)
^^^^^^^^^^^^^^^^^
File "/home/joakim/.local/lib/python3.12/site-packages/inputscope/listener.py", line 526, in extract
elif ord("A") <= vk <= ord("Z") or ord("0") <= vk <= ord("9"):
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
The text was updated successfully, but these errors were encountered: