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.
remotes/origin/Plasma/5.5
Martin Gräßlin 11 years ago
parent 902bdb6cf0
commit 66ad99787c
  1. 1
      input.cpp
  2. 7
      input.h

@ -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()) {

@ -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…
Cancel
Save