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

Method keyReleaseEvent

src/program/ui/ControllerTabWindow.cpp:185–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void ControllerTabWindow::keyReleaseEvent(QKeyEvent *e)
186{
187 keysym_t mod = convertQtModifiers(e->modifiers());
188 keysym_t ks = context->config.km->nativeToKeysym(e->nativeVirtualKey());
189
190 if (context->config.km->hotkey_mapping.find(ks | mod) != context->config.km->hotkey_mapping.end()) {
191 HotKey hk = context->config.km->hotkey_mapping[ks | mod];
192 context->hotkey_released_queue.push(hk.type);
193 return;
194 }
195 if (context->config.km->hotkey_mapping.find(ks) != context->config.km->hotkey_mapping.end()) {
196 HotKey hk = context->config.km->hotkey_mapping[ks];
197 context->hotkey_released_queue.push(hk.type);
198 return;
199 }
200 if (context->config.km->input_mapping.find(ks) != context->config.km->input_mapping.end()) {
201 SingleInput si = context->config.km->input_mapping[ks];
202 if (si.inputTypeIsController())
203 return slotButtonToggle(si.inputTypeToControllerNumber(), si.which, false);
204 }
205
206 QWidget::keyReleaseEvent(e);
207}

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected