Class AppendKeyboardEventFilter

Class Documentation

class AppendKeyboardEventFilter

Appends a keyboard event filter to the Mir server event pipeline.

Filters are processed in order. This filter is appended after any existing filters, including those provided by miral::WindowManagementPolicy.

An event is passed to this filter only if no earlier filter has already handled it.

See also

miral::WindowManagementPolicy - the keyboard event handler for the window management policy.

See also

AppendEventFilter - add a filter for any event, not just keyboards

Remark

Since MirAL 5.5

Public Functions

explicit AppendKeyboardEventFilter(std::function<bool(MirKeyboardEvent const *event)> const &filter)

Constructs a new keyboard filter wrapper using the provided filter function.

Parameters:

filter – A function that returns true if it handled the keyboard event. Returning true prevents later filters from seeing the event.

void operator()(mir::Server &server)