MCPcopy Create free account
hub / github.com/clementgallet/libTAS / keyReleaseEvent

Method keyReleaseEvent

src/program/ui/InputEditorView.cpp:590–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588}
589
590void InputEditorView::keyReleaseEvent(QKeyEvent *event)
591{
592 /* Ignore auto-repeat events for hotkeys */
593 if (event->isAutoRepeat())
594 return QTableView::keyReleaseEvent(event);
595
596 /* We accept hotkeys when this window has focus */
597 keysym_t mod = convertQtModifiers(event->modifiers());
598 keysym_t ks = context->config.km->nativeToKeysym(event->nativeVirtualKey());
599
600 if (context->config.km->hotkey_mapping.find(ks | mod) != context->config.km->hotkey_mapping.end()) {
601 HotKey hk = context->config.km->hotkey_mapping[ks | mod];
602 context->hotkey_released_queue.push(hk.type);
603 return;
604 }
605 if (context->config.km->hotkey_mapping.find(ks) != context->config.km->hotkey_mapping.end()) {
606 HotKey hk = context->config.km->hotkey_mapping[ks];
607 context->hotkey_released_queue.push(hk.type);
608 return;
609 }
610
611 return QTableView::keyReleaseEvent(event);
612}
613
614void InputEditorView::horizontalMenu(QPoint pos)
615{

Callers

nothing calls this directly

Calls 5

convertQtModifiersFunction · 0.85
nativeToKeysymMethod · 0.45
findMethod · 0.45
endMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected