waycrate_xkbkeycode 0.18.0-beta1

something about xkbcommon, used in iced-layershell
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! XKB keymap.

use crate::keyboard::PhysicalKey;

pub use winit_common::xkb::scancode_to_physicalkey;

/// Map the raw X11-style keycode to the `KeyCode` enum.
///
/// X11-style keycodes are offset by 8 from the keycodes the Linux kernel uses.
pub fn raw_keycode_to_physicalkey(keycode: u32) -> PhysicalKey {
    scancode_to_physicalkey(keycode.saturating_sub(8))
}