mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-12 23:25:42 -05:00
Handle KeyRelease events of global shortcuts.
This commit is contained in:
parent
54641a2304
commit
8b0409b228
1 changed files with 6 additions and 2 deletions
|
|
@ -154,10 +154,14 @@ int AutoTypePlatformX11::platformEventFilter(void* event)
|
||||||
{
|
{
|
||||||
XEvent* xevent = static_cast<XEvent*>(event);
|
XEvent* xevent = static_cast<XEvent*>(event);
|
||||||
|
|
||||||
if (xevent->type == KeyPress && m_currentGlobalKey && xevent->xkey.keycode == m_currentGlobalKeycode
|
if ((xevent->type == KeyPress || xevent->type == KeyRelease)
|
||||||
|
&& m_currentGlobalKey
|
||||||
|
&& xevent->xkey.keycode == m_currentGlobalKeycode
|
||||||
&& (xevent->xkey.state & m_modifierMask) == m_currentGlobalNativeModifiers
|
&& (xevent->xkey.state & m_modifierMask) == m_currentGlobalNativeModifiers
|
||||||
&& !QApplication::focusWidget()) {
|
&& !QApplication::focusWidget()) {
|
||||||
|
if (xevent->type == KeyPress) {
|
||||||
Q_EMIT globalShortcutTriggered();
|
Q_EMIT globalShortcutTriggered();
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (xevent->type == MappingNotify) {
|
if (xevent->type == MappingNotify) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue