Skip to content
  • Martin Flöser's avatar
    Implement internal keyboard repeat · cb3c6a47
    Martin Flöser authored
    As a Wayland server KWin does not have to emit additional key repeat
    events (unlike X11). The clients are responsible for handling this based
    on the provided key repeat information.
    
    Internally KWin needs key repeat, though. E.g. the effects need key
    repeat (filtering in Present Windows), window moving by keyboard needs
    repeat, etc. etc.
    
    This change introduces the internal key repeat. For each key press a
    QTimer is started which gets canceled again on the key release. If the
    timer fires it invoked processKey with a new KeyboardKeyAutoRepeat state.
    This is handled just like a KeyPress, but states are not updated and
    the QKeyEvent has autorepeat set to true.
    
    The event filters check for the autorepeat state and filter the event
    out if they are not interested in it. E.g. the filters passing the event
    to the Wayland client need to filter it out.
    
    Currently auto-repeat is bound to using libinput. This needs to be
    modified. The only backend sending repeated events is X11, thu...
    cb3c6a47