mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Handle KeyRelease events of global shortcuts.
This commit is contained in:
parent
54641a2304
commit
8b0409b228
@ -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()) {
|
||||||
Q_EMIT globalShortcutTriggered();
|
if (xevent->type == KeyPress) {
|
||||||
|
Q_EMIT globalShortcutTriggered();
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (xevent->type == MappingNotify) {
|
if (xevent->type == MappingNotify) {
|
||||||
|
Loading…
Reference in New Issue
Block a user