MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / keyPressEvent

Method keyPressEvent

app/src/DataModel/Editors/OutputCodeEditor.cpp:538–548  ·  view source on GitHub ↗

* @brief Forwards completer navigation/commit keys to the popup when visible; everything else * goes straight to the editor widget so QCompleter's focus check cannot hide the popup. */

Source from the content-addressed store, hash-verified

536 * goes straight to the editor widget so QCompleter's focus check cannot hide the popup.
537 */
538void DataModel::OutputCodeEditor::keyPressEvent(QKeyEvent* event)
539{
540 auto* completer = m_widget.completer();
541 if (completer && completer->popup() && completer->popup()->isVisible()
542 && SerialStudioCompleter::popupHandlesKey(event->key()))
543 QCoreApplication::sendEvent(completer->popup(), event);
544 else
545 QCoreApplication::sendEvent(&m_widget, event);
546
547 renderWidget();
548}
549
550/**
551 * @brief Forwards key-release events to the backing QCodeEditor widget.

Callers

nothing calls this directly

Calls 2

completerMethod · 0.80
keyMethod · 0.80

Tested by

no test coverage detected