#3705 Hotkeys broken on macOS servers
This commit is contained in:
parent
1dafe532e5
commit
1709984f1e
|
@ -1282,36 +1282,31 @@ OSXScreen::onKey(CGEventRef event)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for hot key. when we're on a secondary screen we disable
|
// check for hot key
|
||||||
// all hotkeys so we can capture the OS defined hot keys as regular
|
HotKeyToIDMap::const_iterator i =
|
||||||
// keystrokes but that means we don't get our own hot keys either.
|
m_hotKeyToIDMap.find(HotKeyItem(virtualKey,
|
||||||
// so we check for a key/modifier match in our hot key map.
|
m_keyState->mapModifiersToCarbon(macMask)
|
||||||
if (!m_isOnScreen) {
|
& 0xff00u));
|
||||||
HotKeyToIDMap::const_iterator i =
|
if (i != m_hotKeyToIDMap.end()) {
|
||||||
m_hotKeyToIDMap.find(HotKeyItem(virtualKey,
|
UInt32 id = i->second;
|
||||||
m_keyState->mapModifiersToCarbon(macMask)
|
|
||||||
& 0xff00u));
|
|
||||||
if (i != m_hotKeyToIDMap.end()) {
|
|
||||||
UInt32 id = i->second;
|
|
||||||
|
|
||||||
// determine event type
|
// determine event type
|
||||||
Event::Type type;
|
Event::Type type;
|
||||||
//UInt32 eventKind = GetEventKind(event);
|
//UInt32 eventKind = GetEventKind(event);
|
||||||
if (eventKind == kCGEventKeyDown) {
|
if (eventKind == kCGEventKeyDown) {
|
||||||
type = m_events->forIPrimaryScreen().hotKeyDown();
|
type = m_events->forIPrimaryScreen().hotKeyDown();
|
||||||
}
|
|
||||||
else if (eventKind == kCGEventKeyUp) {
|
|
||||||
type = m_events->forIPrimaryScreen().hotKeyUp();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_events->addEvent(Event(type, getEventTarget(),
|
|
||||||
HotKeyInfo::alloc(id)));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
else if (eventKind == kCGEventKeyUp) {
|
||||||
|
type = m_events->forIPrimaryScreen().hotKeyUp();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_events->addEvent(Event(type, getEventTarget(),
|
||||||
|
HotKeyInfo::alloc(id)));
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// decode event type
|
// decode event type
|
||||||
|
|
Loading…
Reference in New Issue