Add support for keyboard key press and release from fake input protocol

Summary: Depends on D23766.

Reviewers: davidedmundson, #plasma, romangg

Reviewed By: davidedmundson, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23769
This commit is contained in:
Jan Grulich 2019-09-07 13:36:18 +02:00
parent 929866b1a0
commit 3faeb543a7

View file

@ -1780,6 +1780,20 @@ void InputRedirection::setupWorkspace()
m_touch->frame();
}
);
connect(device, &FakeInputDevice::keyboardKeyPressRequested, this,
[this] (quint32 button) {
// TODO: Fix time
m_keyboard->processKey(button, InputRedirection::KeyboardKeyPressed, 0);
waylandServer()->simulateUserActivity();
}
);
connect(device, &FakeInputDevice::keyboardKeyReleaseRequested, this,
[this] (quint32 button) {
// TODO: Fix time
m_keyboard->processKey(button, InputRedirection::KeyboardKeyReleased, 0);
waylandServer()->simulateUserActivity();
}
);
}
);
connect(workspace(), &Workspace::configChanged, this, &InputRedirection::reconfigure);