Hold Keys mode: keys stay down while touched, like a hardware keyboard
- HardwareKeys presses a key's unshifted keysym on touch and releases it on lift, through fake input; held keys repeat and combine as on a physical keyboard (games, Shift+click) - Shift/Ctrl/Alt/Super are plain held keys, caps lock is the system's, dead keys compose in the app - No long-press, flick, trackpad or rollover in this mode; nothing is left held when the mode is turned off or touches are cancelled - Settings switch; default stays the touch (virtual keyboard) mode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,13 @@ void KWinInputMethod::sendKeysym(quint32 keysym, Qt::KeyboardModifiers modifiers
|
||||
m_fakeInput.sendKeysym(keysym, modifiers);
|
||||
}
|
||||
|
||||
// Always fake input, even in a text field: held keys are key events, and the
|
||||
// input method's keysyms can't hold a modifier across keys.
|
||||
void KWinInputMethod::setKeyPressed(quint32 keysym, bool pressed)
|
||||
{
|
||||
m_fakeInput.setKeyPressed(keysym, pressed);
|
||||
}
|
||||
|
||||
void KWinInputMethod::activate(::zwp_input_method_context_v1 *context)
|
||||
{
|
||||
m_context = std::make_unique<KWinInputContext>(context);
|
||||
|
||||
Reference in New Issue
Block a user