Add signal InputRedirection::keyStateChanged
Complements all other signals for internal usage that there is an input event. Needed by e.g. DPMS implementation to re-enable the outputs.
This commit is contained in:
parent
902bdb6cf0
commit
66ad99787c
2 changed files with 8 additions and 0 deletions
|
@ -855,6 +855,7 @@ void InputRedirection::updateKeyboardWindow()
|
|||
|
||||
void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::KeyboardKeyState state, uint32_t time)
|
||||
{
|
||||
emit keyStateChanged(key, state);
|
||||
const Qt::KeyboardModifiers oldMods = keyboardModifiers();
|
||||
m_xkb->updateKey(key, state);
|
||||
if (oldMods != keyboardModifiers()) {
|
||||
|
|
7
input.h
7
input.h
|
@ -182,6 +182,13 @@ Q_SIGNALS:
|
|||
* @param oldMods The previous modifiers state
|
||||
*/
|
||||
void keyboardModifiersChanged(Qt::KeyboardModifiers newMods, Qt::KeyboardModifiers oldMods);
|
||||
/**
|
||||
* @brief Emitted when the state of a key changed.
|
||||
*
|
||||
* @param keyCode The keycode of the key which changed
|
||||
* @param oldMods The new key state
|
||||
*/
|
||||
void keyStateChanged(quint32 keyCode, InputRedirection::KeyboardKeyState state);
|
||||
|
||||
private:
|
||||
static QEvent::Type buttonStateToEvent(PointerButtonState state);
|
||||
|
|
Loading…
Reference in a new issue