MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / keyPressEvent

Method keyPressEvent

widgets/hotkeywidget.cpp:108–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void HotkeyWidget::keyPressEvent(QKeyEvent *event)
109{
110 if (mKeyboardFocus) {
111 return;
112 }
113
114 if (isModifier(event->key())) {
115 return;
116 }
117
118 if (!isValid(event->key())) {
119 setText(tr("Invalid hotkey"));
120 parentWidget()->setFocus();
121 return;
122 }
123
124 mHotkey = QKeySequence(event->key() + (event->modifiers() & ~Qt::KeypadModifier));
125
126 setHotkeyText();
127}
128
129void HotkeyWidget::hideError()
130{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected