[−][src]Function smithay_client_toolkit::seat::keyboard::map_keyboard
pub fn map_keyboard<F>(
seat: &Attached<WlSeat>,
rmlvo: Option<RMLVO>,
callback: F
) -> Result<WlKeyboard, Error> where
F: FnMut(Event<'_>, WlKeyboard, DispatchData<'_>) + 'static,
Implement a keyboard for keymap translation with key repetition
This requires you to provide a callback to receive the events after they have been interpreted with the keymap.
The keymap will be loaded from the provided RMLVO rules, or from the compositor
provided keymap if None
.
Returns an error if xkbcommon could not be initialized, the RMLVO specification contained invalid values, or if the provided seat does not have keyboard capability.
Note: This adapter does not handle key repetition. See map_keyboard_repeat
for that.