You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the package on Ubuntu 21.04, and it seems the "globality" of the hotkeys is very much reduced there.
The simplistic example, which at the heart is
hk = SystemHotkey()
hk.register(('control', 'shift', 'h'), callback=lambda x:print("Easy!", x))
will not receive keystrokes, except when the corresponding widget has focus (I am embedding this in a Qt application), i.e. not even when the corresponding parent console window receives input.
Is there any idea how I could get across this to keep using system-hotkey - did I miss anything?
Thank you!
A 'working' snippet (well it works on Ubuntu 18/20) to allow for reproducing the behaviour:
from PySide2.QtWidgets import QApplication, QDialog
from system_hotkey import SystemHotkey
hk = SystemHotkey()
hk.register(('control', 'shift', 'h'), callback=lambda x:print("Easy!", x))
app = QApplication()
dialog = QDialog()
# dialog.setTitle("mittudomen?")
dialog.show()
app.exec_()
(PySide2/Qt 5.15.2 and system-hotkey 1.0.3 are involved)
The text was updated successfully, but these errors were encountered:
brezniczky
changed the title
Ubuntu 21 problem
Ubuntu 21 globality problem
Jul 9, 2021
All right, sorry. I have began to process the information that Ubuntu 21 is based on Wayland, and Wayland does not - for security considerations - allow client applications to register global hotkeys.
I would like to hold myself back from commenting on how this is carried out by the Wayland maintainers (?), and for how long, but I expect that probably there won't be any solution in the scope of the system-hotkey package for this too soon.
Hello!
I am trying to use the package on Ubuntu 21.04, and it seems the "globality" of the hotkeys is very much reduced there.
The simplistic example, which at the heart is
will not receive keystrokes, except when the corresponding widget has focus (I am embedding this in a Qt application), i.e. not even when the corresponding parent console window receives input.
Is there any idea how I could get across this to keep using system-hotkey - did I miss anything?
Thank you!
A 'working' snippet (well it works on Ubuntu 18/20) to allow for reproducing the behaviour:
(PySide2/Qt 5.15.2 and system-hotkey 1.0.3 are involved)
The text was updated successfully, but these errors were encountered: