| 159 | } |
| 160 | |
| 161 | void ControllerTabWindow::keyPressEvent(QKeyEvent *e) |
| 162 | { |
| 163 | keysym_t mod = convertQtModifiers(e->modifiers()); |
| 164 | keysym_t ks = context->config.km->nativeToKeysym(e->nativeVirtualKey()); |
| 165 | |
| 166 | if (context->config.km->hotkey_mapping.find(ks | mod) != context->config.km->hotkey_mapping.end()) { |
| 167 | HotKey hk = context->config.km->hotkey_mapping[ks | mod]; |
| 168 | context->hotkey_pressed_queue.push(hk.type); |
| 169 | return; |
| 170 | } |
| 171 | if (context->config.km->hotkey_mapping.find(ks) != context->config.km->hotkey_mapping.end()) { |
| 172 | HotKey hk = context->config.km->hotkey_mapping[ks]; |
| 173 | context->hotkey_pressed_queue.push(hk.type); |
| 174 | return; |
| 175 | } |
| 176 | if (context->config.km->input_mapping.find(ks) != context->config.km->input_mapping.end()) { |
| 177 | SingleInput si = context->config.km->input_mapping[ks]; |
| 178 | if (si.inputTypeIsController()) |
| 179 | return slotButtonToggle(si.inputTypeToControllerNumber(), si.which, true); |
| 180 | } |
| 181 | |
| 182 | QWidget::keyPressEvent(e); |
| 183 | } |
| 184 | |
| 185 | void ControllerTabWindow::keyReleaseEvent(QKeyEvent *e) |
| 186 | { |
nothing calls this directly
no test coverage detected