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

Method keyPressEvent

src/program/ui/KeyPressedDialog.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void KeyPressedDialog::keyPressEvent(QKeyEvent * e)
43{
44 int modifiers = 0;
45 if (withModifiers) {
46
47 /* We ignore a key press on a modifier key if we accept a mapping that
48 * includes modifier keys */
49 if (context->config.km->is_modifier(e->nativeVirtualKey())) {
50 return QDialog::keyPressEvent(e);
51 }
52
53 /* Build modifiers */
54 modifiers = convertQtModifiers(e->modifiers());
55 }
56
57 done(modifiers | context->config.km->nativeToKeysym(e->nativeVirtualKey()));
58}

Callers

nothing calls this directly

Calls 3

convertQtModifiersFunction · 0.85
is_modifierMethod · 0.80
nativeToKeysymMethod · 0.45

Tested by

no test coverage detected