Function wayland_kbd::register_kbd [] [src]

pub fn register_kbd<ID: 'static>(
    evqh: &mut EventQueueHandle,
    kbd: &WlKeyboard,
    implem: MappedKeyboardImplementation<ID>,
    idata: ID
) -> Result<(), MappedKeyboardError>

Register a keyboard with the implementation provided by this crate

This requires you to provide an implementation and its implementation data to receive the events after they have been interpreted with the keymap.

The keymap information will be loaded from the events sent by the compositor, as such you need to call this method as soon as you have created the keyboard to make sure this event does not get lost.

Returns an error if xkbcommon could not be initialized.