Module rs::keyboard

source ยท
Expand description

State of the emulated keyboard and keys. Regards the keyboard as if it was composed of switches.

Structsยง

  • The extended, unambiguous layout-keycode
  • When the submitted actions of keys need to be tracked, they need a stable, comparable ID. With layout::ButtonPosition, the IDs are unique within layouts.
  • Map to virtual_keyboard.modifiers modifiers values From https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Keyboard_State

Enumsยง

Functionsยง

  • Generates a mapping where each key gets a keycode, starting from 8 HACK: starting from 9, because 8 results in keycode 0, which the compositor likes to discard
  • generate_keymap ๐Ÿ”’
    Generates a de-facto single level keymap. Key codes must not repeat and must remain between 9 and 255.
  • single_key_map_new ๐Ÿ”’
  • sorted ๐Ÿ”’
    Sorts an iterator by converting it to a Vector and back

Type Aliasesยง

  • SingleKeyMap ๐Ÿ”’
    Index is the key code, String is the occupant. Starts all empty. https://gitlab.freedesktop.org/xorg/xserver/-/issues/260