Changeset View
Changeset View
Standalone View
Standalone View
keyboard_input.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | 110 | { | |||
---|---|---|---|---|---|
117 | m_input->installInputEventSpy(new KeyStateChangedSpy(m_input)); | 117 | m_input->installInputEventSpy(new KeyStateChangedSpy(m_input)); | ||
118 | m_modifiersChangedSpy = new ModifiersChangedSpy(m_input); | 118 | m_modifiersChangedSpy = new ModifiersChangedSpy(m_input); | ||
119 | m_input->installInputEventSpy(m_modifiersChangedSpy); | 119 | m_input->installInputEventSpy(m_modifiersChangedSpy); | ||
120 | m_keyboardLayout = new KeyboardLayout(m_xkb.data()); | 120 | m_keyboardLayout = new KeyboardLayout(m_xkb.data()); | ||
121 | m_keyboardLayout->setConfig(config); | 121 | m_keyboardLayout->setConfig(config); | ||
122 | m_keyboardLayout->init(); | 122 | m_keyboardLayout->init(); | ||
123 | m_input->installInputEventSpy(m_keyboardLayout); | 123 | m_input->installInputEventSpy(m_keyboardLayout); | ||
124 | 124 | | |||
125 | if (waylandServer()->hasGlobalShortcutSupport()) { | ||||
125 | m_input->installInputEventSpy(new ModifierOnlyShortcuts); | 126 | m_input->installInputEventSpy(new ModifierOnlyShortcuts); | ||
127 | } | ||||
126 | 128 | | |||
127 | KeyboardRepeat *keyRepeatSpy = new KeyboardRepeat(m_xkb.data()); | 129 | KeyboardRepeat *keyRepeatSpy = new KeyboardRepeat(m_xkb.data()); | ||
128 | connect(keyRepeatSpy, &KeyboardRepeat::keyRepeat, this, | 130 | connect(keyRepeatSpy, &KeyboardRepeat::keyRepeat, this, | ||
129 | std::bind(&KeyboardInputRedirection::processKey, this, std::placeholders::_1, InputRedirection::KeyboardKeyAutoRepeat, std::placeholders::_2, nullptr)); | 131 | std::bind(&KeyboardInputRedirection::processKey, this, std::placeholders::_1, InputRedirection::KeyboardKeyAutoRepeat, std::placeholders::_2, nullptr)); | ||
130 | m_input->installInputEventSpy(keyRepeatSpy); | 132 | m_input->installInputEventSpy(keyRepeatSpy); | ||
131 | 133 | | |||
132 | connect(workspace(), &QObject::destroyed, this, [this] { m_inited = false; }); | 134 | connect(workspace(), &QObject::destroyed, this, [this] { m_inited = false; }); | ||
133 | connect(waylandServer(), &QObject::destroyed, this, [this] { m_inited = false; }); | 135 | connect(waylandServer(), &QObject::destroyed, this, [this] { m_inited = false; }); | ||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |