mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-12 06:09:49 +01:00
input-capture: send modifiers (highly experimental)
This commit is contained in:
parent
6dfbcdc994
commit
21a7251d02
3 changed files with 12 additions and 0 deletions
|
@ -1384,6 +1384,11 @@ void CInputManager::onKeyboardMod(SP<IKeyboard> pKeyboard) {
|
|||
auto MODS = pKeyboard->modifiersState;
|
||||
MODS.depressed = ALLMODS;
|
||||
|
||||
PROTO::inputCapture->sendModifiers(MODS.depressed,MODS.latched, MODS.locked, MODS.group);
|
||||
|
||||
if (PROTO::inputCapture->isCaptured())
|
||||
return;
|
||||
|
||||
const auto IME = m_sIMERelay.m_pIME.lock();
|
||||
|
||||
if (IME && IME->hasGrab() && !DISALLOWACTION) {
|
||||
|
|
|
@ -79,6 +79,12 @@ void CInputCaptureProtocol::sendKey(uint32_t keyCode, hyprlandInputCaptureManage
|
|||
manager->sendKey(keyCode, state);
|
||||
}
|
||||
|
||||
void CInputCaptureProtocol::sendModifiers(uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) {
|
||||
for (const auto& manager : m_vManagers)
|
||||
manager->sendModifiers(mods_depressed, mods_locked, mods_locked, group);
|
||||
}
|
||||
|
||||
|
||||
void CInputCaptureProtocol::sendButton(uint32_t button, hyprlandInputCaptureManagerV1ButtonState state) {
|
||||
for (const auto& manager : m_vManagers)
|
||||
manager->sendButton(button, state);
|
||||
|
|
|
@ -18,6 +18,7 @@ class CInputCaptureProtocol : public IWaylandProtocol {
|
|||
|
||||
void sendMotion(const Vector2D& absolutePosition, const Vector2D& delta);
|
||||
void sendKey(uint32_t keyCode, hyprlandInputCaptureManagerV1KeyState state);
|
||||
void sendModifiers(uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group);
|
||||
void sendButton(uint32_t button, hyprlandInputCaptureManagerV1ButtonState state);
|
||||
void sendAxis(hyprlandInputCaptureManagerV1Axis axis, double value);
|
||||
void sendAxisValue120(hyprlandInputCaptureManagerV1Axis axis, int32_t value120);
|
||||
|
|
Loading…
Reference in a new issue