mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 05:41:31 +11:00
Update xkbcommon-dl to 0.4.0
Most things were simply renamed due to migration to xkeysym.
This commit is contained in:
parent
e23186db8e
commit
0defd747c8
|
@ -123,7 +123,7 @@ wayland-backend = { version = "0.1.0", default_features = false, features = ["cl
|
||||||
wayland-protocols = { version = "0.30.0", features = [ "staging"], optional = true }
|
wayland-protocols = { version = "0.30.0", features = [ "staging"], optional = true }
|
||||||
calloop = "0.10.5"
|
calloop = "0.10.5"
|
||||||
x11-dl = { version = "2.18.5", optional = true }
|
x11-dl = { version = "2.18.5", optional = true }
|
||||||
xkbcommon-dl = "0.3.0"
|
xkbcommon-dl = "0.4.0"
|
||||||
memmap2 = { version = "0.5.0", optional = true }
|
memmap2 = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
[target.'cfg(target_os = "redox")'.dependencies]
|
[target.'cfg(target_os = "redox")'.dependencies]
|
||||||
|
|
|
@ -37,6 +37,8 @@ skip = [
|
||||||
{ name = "memmap2" }, # sctk uses a different version until the next update
|
{ name = "memmap2" }, # sctk uses a different version until the next update
|
||||||
{ name = "libloading" }, # x11rb uses a different version until the next update
|
{ name = "libloading" }, # x11rb uses a different version until the next update
|
||||||
{ name = "syn" }, # https://github.com/rust-mobile/ndk/issues/392 and https://github.com/rustwasm/wasm-bindgen/issues/3390
|
{ name = "syn" }, # https://github.com/rust-mobile/ndk/issues/392 and https://github.com/rustwasm/wasm-bindgen/issues/3390
|
||||||
|
{ name = "num_enum"}, # See above ^, waiting for release
|
||||||
|
{ name = "num_enum_derive"},# See above ^, waiting for release
|
||||||
{ name = "miniz_oxide"}, # https://github.com/rust-lang/flate2-rs/issues/340
|
{ name = "miniz_oxide"}, # https://github.com/rust-lang/flate2-rs/issues/340
|
||||||
{ name = "redox_syscall" }, # https://gitlab.redox-os.org/redox-os/orbclient/-/issues/46
|
{ name = "redox_syscall" }, # https://gitlab.redox-os.org/redox-os/orbclient/-/issues/46
|
||||||
]
|
]
|
||||||
|
|
|
@ -417,415 +417,415 @@ pub fn keysym_to_key(keysym: u32) -> Key {
|
||||||
use xkbcommon_dl::keysyms;
|
use xkbcommon_dl::keysyms;
|
||||||
match keysym {
|
match keysym {
|
||||||
// TTY function keys
|
// TTY function keys
|
||||||
keysyms::XKB_KEY_BackSpace => Key::Backspace,
|
keysyms::BackSpace => Key::Backspace,
|
||||||
keysyms::XKB_KEY_Tab => Key::Tab,
|
keysyms::Tab => Key::Tab,
|
||||||
// keysyms::XKB_KEY_Linefeed => Key::Linefeed,
|
// keysyms::Linefeed => Key::Linefeed,
|
||||||
keysyms::XKB_KEY_Clear => Key::Clear,
|
keysyms::Clear => Key::Clear,
|
||||||
keysyms::XKB_KEY_Return => Key::Enter,
|
keysyms::Return => Key::Enter,
|
||||||
keysyms::XKB_KEY_Pause => Key::Pause,
|
keysyms::Pause => Key::Pause,
|
||||||
keysyms::XKB_KEY_Scroll_Lock => Key::ScrollLock,
|
keysyms::Scroll_Lock => Key::ScrollLock,
|
||||||
keysyms::XKB_KEY_Sys_Req => Key::PrintScreen,
|
keysyms::Sys_Req => Key::PrintScreen,
|
||||||
keysyms::XKB_KEY_Escape => Key::Escape,
|
keysyms::Escape => Key::Escape,
|
||||||
keysyms::XKB_KEY_Delete => Key::Delete,
|
keysyms::Delete => Key::Delete,
|
||||||
|
|
||||||
// IME keys
|
// IME keys
|
||||||
keysyms::XKB_KEY_Multi_key => Key::Compose,
|
keysyms::Multi_key => Key::Compose,
|
||||||
keysyms::XKB_KEY_Codeinput => Key::CodeInput,
|
keysyms::Codeinput => Key::CodeInput,
|
||||||
keysyms::XKB_KEY_SingleCandidate => Key::SingleCandidate,
|
keysyms::SingleCandidate => Key::SingleCandidate,
|
||||||
keysyms::XKB_KEY_MultipleCandidate => Key::AllCandidates,
|
keysyms::MultipleCandidate => Key::AllCandidates,
|
||||||
keysyms::XKB_KEY_PreviousCandidate => Key::PreviousCandidate,
|
keysyms::PreviousCandidate => Key::PreviousCandidate,
|
||||||
|
|
||||||
// Japanese keys
|
// Japanese keys
|
||||||
keysyms::XKB_KEY_Kanji => Key::KanjiMode,
|
keysyms::Kanji => Key::KanjiMode,
|
||||||
keysyms::XKB_KEY_Muhenkan => Key::NonConvert,
|
keysyms::Muhenkan => Key::NonConvert,
|
||||||
keysyms::XKB_KEY_Henkan_Mode => Key::Convert,
|
keysyms::Henkan_Mode => Key::Convert,
|
||||||
keysyms::XKB_KEY_Romaji => Key::Romaji,
|
keysyms::Romaji => Key::Romaji,
|
||||||
keysyms::XKB_KEY_Hiragana => Key::Hiragana,
|
keysyms::Hiragana => Key::Hiragana,
|
||||||
keysyms::XKB_KEY_Hiragana_Katakana => Key::HiraganaKatakana,
|
keysyms::Hiragana_Katakana => Key::HiraganaKatakana,
|
||||||
keysyms::XKB_KEY_Zenkaku => Key::Zenkaku,
|
keysyms::Zenkaku => Key::Zenkaku,
|
||||||
keysyms::XKB_KEY_Hankaku => Key::Hankaku,
|
keysyms::Hankaku => Key::Hankaku,
|
||||||
keysyms::XKB_KEY_Zenkaku_Hankaku => Key::ZenkakuHankaku,
|
keysyms::Zenkaku_Hankaku => Key::ZenkakuHankaku,
|
||||||
// keysyms::XKB_KEY_Touroku => Key::Touroku,
|
// keysyms::Touroku => Key::Touroku,
|
||||||
// keysyms::XKB_KEY_Massyo => Key::Massyo,
|
// keysyms::Massyo => Key::Massyo,
|
||||||
keysyms::XKB_KEY_Kana_Lock => Key::KanaMode,
|
keysyms::Kana_Lock => Key::KanaMode,
|
||||||
keysyms::XKB_KEY_Kana_Shift => Key::KanaMode,
|
keysyms::Kana_Shift => Key::KanaMode,
|
||||||
keysyms::XKB_KEY_Eisu_Shift => Key::Alphanumeric,
|
keysyms::Eisu_Shift => Key::Alphanumeric,
|
||||||
keysyms::XKB_KEY_Eisu_toggle => Key::Alphanumeric,
|
keysyms::Eisu_toggle => Key::Alphanumeric,
|
||||||
// NOTE: The next three items are aliases for values we've already mapped.
|
// NOTE: The next three items are aliases for values we've already mapped.
|
||||||
// keysyms::XKB_KEY_Kanji_Bangou => Key::CodeInput,
|
// keysyms::Kanji_Bangou => Key::CodeInput,
|
||||||
// keysyms::XKB_KEY_Zen_Koho => Key::AllCandidates,
|
// keysyms::Zen_Koho => Key::AllCandidates,
|
||||||
// keysyms::XKB_KEY_Mae_Koho => Key::PreviousCandidate,
|
// keysyms::Mae_Koho => Key::PreviousCandidate,
|
||||||
|
|
||||||
// Cursor control & motion
|
// Cursor control & motion
|
||||||
keysyms::XKB_KEY_Home => Key::Home,
|
keysyms::Home => Key::Home,
|
||||||
keysyms::XKB_KEY_Left => Key::ArrowLeft,
|
keysyms::Left => Key::ArrowLeft,
|
||||||
keysyms::XKB_KEY_Up => Key::ArrowUp,
|
keysyms::Up => Key::ArrowUp,
|
||||||
keysyms::XKB_KEY_Right => Key::ArrowRight,
|
keysyms::Right => Key::ArrowRight,
|
||||||
keysyms::XKB_KEY_Down => Key::ArrowDown,
|
keysyms::Down => Key::ArrowDown,
|
||||||
// keysyms::XKB_KEY_Prior => Key::PageUp,
|
// keysyms::Prior => Key::PageUp,
|
||||||
keysyms::XKB_KEY_Page_Up => Key::PageUp,
|
keysyms::Page_Up => Key::PageUp,
|
||||||
// keysyms::XKB_KEY_Next => Key::PageDown,
|
// keysyms::Next => Key::PageDown,
|
||||||
keysyms::XKB_KEY_Page_Down => Key::PageDown,
|
keysyms::Page_Down => Key::PageDown,
|
||||||
keysyms::XKB_KEY_End => Key::End,
|
keysyms::End => Key::End,
|
||||||
// keysyms::XKB_KEY_Begin => Key::Begin,
|
// keysyms::Begin => Key::Begin,
|
||||||
|
|
||||||
// Misc. functions
|
// Misc. functions
|
||||||
keysyms::XKB_KEY_Select => Key::Select,
|
keysyms::Select => Key::Select,
|
||||||
keysyms::XKB_KEY_Print => Key::PrintScreen,
|
keysyms::Print => Key::PrintScreen,
|
||||||
keysyms::XKB_KEY_Execute => Key::Execute,
|
keysyms::Execute => Key::Execute,
|
||||||
keysyms::XKB_KEY_Insert => Key::Insert,
|
keysyms::Insert => Key::Insert,
|
||||||
keysyms::XKB_KEY_Undo => Key::Undo,
|
keysyms::Undo => Key::Undo,
|
||||||
keysyms::XKB_KEY_Redo => Key::Redo,
|
keysyms::Redo => Key::Redo,
|
||||||
keysyms::XKB_KEY_Menu => Key::ContextMenu,
|
keysyms::Menu => Key::ContextMenu,
|
||||||
keysyms::XKB_KEY_Find => Key::Find,
|
keysyms::Find => Key::Find,
|
||||||
keysyms::XKB_KEY_Cancel => Key::Cancel,
|
keysyms::Cancel => Key::Cancel,
|
||||||
keysyms::XKB_KEY_Help => Key::Help,
|
keysyms::Help => Key::Help,
|
||||||
keysyms::XKB_KEY_Break => Key::Pause,
|
keysyms::Break => Key::Pause,
|
||||||
keysyms::XKB_KEY_Mode_switch => Key::ModeChange,
|
keysyms::Mode_switch => Key::ModeChange,
|
||||||
// keysyms::XKB_KEY_script_switch => Key::ModeChange,
|
// keysyms::script_switch => Key::ModeChange,
|
||||||
keysyms::XKB_KEY_Num_Lock => Key::NumLock,
|
keysyms::Num_Lock => Key::NumLock,
|
||||||
|
|
||||||
// Keypad keys
|
// Keypad keys
|
||||||
// keysyms::XKB_KEY_KP_Space => Key::Character(" "),
|
// keysyms::KP_Space => Key::Character(" "),
|
||||||
keysyms::XKB_KEY_KP_Tab => Key::Tab,
|
keysyms::KP_Tab => Key::Tab,
|
||||||
keysyms::XKB_KEY_KP_Enter => Key::Enter,
|
keysyms::KP_Enter => Key::Enter,
|
||||||
keysyms::XKB_KEY_KP_F1 => Key::F1,
|
keysyms::KP_F1 => Key::F1,
|
||||||
keysyms::XKB_KEY_KP_F2 => Key::F2,
|
keysyms::KP_F2 => Key::F2,
|
||||||
keysyms::XKB_KEY_KP_F3 => Key::F3,
|
keysyms::KP_F3 => Key::F3,
|
||||||
keysyms::XKB_KEY_KP_F4 => Key::F4,
|
keysyms::KP_F4 => Key::F4,
|
||||||
keysyms::XKB_KEY_KP_Home => Key::Home,
|
keysyms::KP_Home => Key::Home,
|
||||||
keysyms::XKB_KEY_KP_Left => Key::ArrowLeft,
|
keysyms::KP_Left => Key::ArrowLeft,
|
||||||
keysyms::XKB_KEY_KP_Up => Key::ArrowLeft,
|
keysyms::KP_Up => Key::ArrowLeft,
|
||||||
keysyms::XKB_KEY_KP_Right => Key::ArrowRight,
|
keysyms::KP_Right => Key::ArrowRight,
|
||||||
keysyms::XKB_KEY_KP_Down => Key::ArrowDown,
|
keysyms::KP_Down => Key::ArrowDown,
|
||||||
// keysyms::XKB_KEY_KP_Prior => Key::PageUp,
|
// keysyms::KP_Prior => Key::PageUp,
|
||||||
keysyms::XKB_KEY_KP_Page_Up => Key::PageUp,
|
keysyms::KP_Page_Up => Key::PageUp,
|
||||||
// keysyms::XKB_KEY_KP_Next => Key::PageDown,
|
// keysyms::KP_Next => Key::PageDown,
|
||||||
keysyms::XKB_KEY_KP_Page_Down => Key::PageDown,
|
keysyms::KP_Page_Down => Key::PageDown,
|
||||||
keysyms::XKB_KEY_KP_End => Key::End,
|
keysyms::KP_End => Key::End,
|
||||||
// This is the key labeled "5" on the numpad when NumLock is off.
|
// This is the key labeled "5" on the numpad when NumLock is off.
|
||||||
// keysyms::XKB_KEY_KP_Begin => Key::Begin,
|
// keysyms::KP_Begin => Key::Begin,
|
||||||
keysyms::XKB_KEY_KP_Insert => Key::Insert,
|
keysyms::KP_Insert => Key::Insert,
|
||||||
keysyms::XKB_KEY_KP_Delete => Key::Delete,
|
keysyms::KP_Delete => Key::Delete,
|
||||||
// keysyms::XKB_KEY_KP_Equal => Key::Equal,
|
// keysyms::KP_Equal => Key::Equal,
|
||||||
// keysyms::XKB_KEY_KP_Multiply => Key::Multiply,
|
// keysyms::KP_Multiply => Key::Multiply,
|
||||||
// keysyms::XKB_KEY_KP_Add => Key::Add,
|
// keysyms::KP_Add => Key::Add,
|
||||||
// keysyms::XKB_KEY_KP_Separator => Key::Separator,
|
// keysyms::KP_Separator => Key::Separator,
|
||||||
// keysyms::XKB_KEY_KP_Subtract => Key::Subtract,
|
// keysyms::KP_Subtract => Key::Subtract,
|
||||||
// keysyms::XKB_KEY_KP_Decimal => Key::Decimal,
|
// keysyms::KP_Decimal => Key::Decimal,
|
||||||
// keysyms::XKB_KEY_KP_Divide => Key::Divide,
|
// keysyms::KP_Divide => Key::Divide,
|
||||||
|
|
||||||
// keysyms::XKB_KEY_KP_0 => Key::Character("0"),
|
// keysyms::KP_0 => Key::Character("0"),
|
||||||
// keysyms::XKB_KEY_KP_1 => Key::Character("1"),
|
// keysyms::KP_1 => Key::Character("1"),
|
||||||
// keysyms::XKB_KEY_KP_2 => Key::Character("2"),
|
// keysyms::KP_2 => Key::Character("2"),
|
||||||
// keysyms::XKB_KEY_KP_3 => Key::Character("3"),
|
// keysyms::KP_3 => Key::Character("3"),
|
||||||
// keysyms::XKB_KEY_KP_4 => Key::Character("4"),
|
// keysyms::KP_4 => Key::Character("4"),
|
||||||
// keysyms::XKB_KEY_KP_5 => Key::Character("5"),
|
// keysyms::KP_5 => Key::Character("5"),
|
||||||
// keysyms::XKB_KEY_KP_6 => Key::Character("6"),
|
// keysyms::KP_6 => Key::Character("6"),
|
||||||
// keysyms::XKB_KEY_KP_7 => Key::Character("7"),
|
// keysyms::KP_7 => Key::Character("7"),
|
||||||
// keysyms::XKB_KEY_KP_8 => Key::Character("8"),
|
// keysyms::KP_8 => Key::Character("8"),
|
||||||
// keysyms::XKB_KEY_KP_9 => Key::Character("9"),
|
// keysyms::KP_9 => Key::Character("9"),
|
||||||
|
|
||||||
// Function keys
|
// Function keys
|
||||||
keysyms::XKB_KEY_F1 => Key::F1,
|
keysyms::F1 => Key::F1,
|
||||||
keysyms::XKB_KEY_F2 => Key::F2,
|
keysyms::F2 => Key::F2,
|
||||||
keysyms::XKB_KEY_F3 => Key::F3,
|
keysyms::F3 => Key::F3,
|
||||||
keysyms::XKB_KEY_F4 => Key::F4,
|
keysyms::F4 => Key::F4,
|
||||||
keysyms::XKB_KEY_F5 => Key::F5,
|
keysyms::F5 => Key::F5,
|
||||||
keysyms::XKB_KEY_F6 => Key::F6,
|
keysyms::F6 => Key::F6,
|
||||||
keysyms::XKB_KEY_F7 => Key::F7,
|
keysyms::F7 => Key::F7,
|
||||||
keysyms::XKB_KEY_F8 => Key::F8,
|
keysyms::F8 => Key::F8,
|
||||||
keysyms::XKB_KEY_F9 => Key::F9,
|
keysyms::F9 => Key::F9,
|
||||||
keysyms::XKB_KEY_F10 => Key::F10,
|
keysyms::F10 => Key::F10,
|
||||||
keysyms::XKB_KEY_F11 => Key::F11,
|
keysyms::F11 => Key::F11,
|
||||||
keysyms::XKB_KEY_F12 => Key::F12,
|
keysyms::F12 => Key::F12,
|
||||||
keysyms::XKB_KEY_F13 => Key::F13,
|
keysyms::F13 => Key::F13,
|
||||||
keysyms::XKB_KEY_F14 => Key::F14,
|
keysyms::F14 => Key::F14,
|
||||||
keysyms::XKB_KEY_F15 => Key::F15,
|
keysyms::F15 => Key::F15,
|
||||||
keysyms::XKB_KEY_F16 => Key::F16,
|
keysyms::F16 => Key::F16,
|
||||||
keysyms::XKB_KEY_F17 => Key::F17,
|
keysyms::F17 => Key::F17,
|
||||||
keysyms::XKB_KEY_F18 => Key::F18,
|
keysyms::F18 => Key::F18,
|
||||||
keysyms::XKB_KEY_F19 => Key::F19,
|
keysyms::F19 => Key::F19,
|
||||||
keysyms::XKB_KEY_F20 => Key::F20,
|
keysyms::F20 => Key::F20,
|
||||||
keysyms::XKB_KEY_F21 => Key::F21,
|
keysyms::F21 => Key::F21,
|
||||||
keysyms::XKB_KEY_F22 => Key::F22,
|
keysyms::F22 => Key::F22,
|
||||||
keysyms::XKB_KEY_F23 => Key::F23,
|
keysyms::F23 => Key::F23,
|
||||||
keysyms::XKB_KEY_F24 => Key::F24,
|
keysyms::F24 => Key::F24,
|
||||||
keysyms::XKB_KEY_F25 => Key::F25,
|
keysyms::F25 => Key::F25,
|
||||||
keysyms::XKB_KEY_F26 => Key::F26,
|
keysyms::F26 => Key::F26,
|
||||||
keysyms::XKB_KEY_F27 => Key::F27,
|
keysyms::F27 => Key::F27,
|
||||||
keysyms::XKB_KEY_F28 => Key::F28,
|
keysyms::F28 => Key::F28,
|
||||||
keysyms::XKB_KEY_F29 => Key::F29,
|
keysyms::F29 => Key::F29,
|
||||||
keysyms::XKB_KEY_F30 => Key::F30,
|
keysyms::F30 => Key::F30,
|
||||||
keysyms::XKB_KEY_F31 => Key::F31,
|
keysyms::F31 => Key::F31,
|
||||||
keysyms::XKB_KEY_F32 => Key::F32,
|
keysyms::F32 => Key::F32,
|
||||||
keysyms::XKB_KEY_F33 => Key::F33,
|
keysyms::F33 => Key::F33,
|
||||||
keysyms::XKB_KEY_F34 => Key::F34,
|
keysyms::F34 => Key::F34,
|
||||||
keysyms::XKB_KEY_F35 => Key::F35,
|
keysyms::F35 => Key::F35,
|
||||||
|
|
||||||
// Modifiers
|
// Modifiers
|
||||||
keysyms::XKB_KEY_Shift_L => Key::Shift,
|
keysyms::Shift_L => Key::Shift,
|
||||||
keysyms::XKB_KEY_Shift_R => Key::Shift,
|
keysyms::Shift_R => Key::Shift,
|
||||||
keysyms::XKB_KEY_Control_L => Key::Control,
|
keysyms::Control_L => Key::Control,
|
||||||
keysyms::XKB_KEY_Control_R => Key::Control,
|
keysyms::Control_R => Key::Control,
|
||||||
keysyms::XKB_KEY_Caps_Lock => Key::CapsLock,
|
keysyms::Caps_Lock => Key::CapsLock,
|
||||||
// keysyms::XKB_KEY_Shift_Lock => Key::ShiftLock,
|
// keysyms::Shift_Lock => Key::ShiftLock,
|
||||||
|
|
||||||
// keysyms::XKB_KEY_Meta_L => Key::Meta,
|
// keysyms::Meta_L => Key::Meta,
|
||||||
// keysyms::XKB_KEY_Meta_R => Key::Meta,
|
// keysyms::Meta_R => Key::Meta,
|
||||||
keysyms::XKB_KEY_Alt_L => Key::Alt,
|
keysyms::Alt_L => Key::Alt,
|
||||||
keysyms::XKB_KEY_Alt_R => Key::Alt,
|
keysyms::Alt_R => Key::Alt,
|
||||||
keysyms::XKB_KEY_Super_L => Key::Super,
|
keysyms::Super_L => Key::Super,
|
||||||
keysyms::XKB_KEY_Super_R => Key::Super,
|
keysyms::Super_R => Key::Super,
|
||||||
keysyms::XKB_KEY_Hyper_L => Key::Hyper,
|
keysyms::Hyper_L => Key::Hyper,
|
||||||
keysyms::XKB_KEY_Hyper_R => Key::Hyper,
|
keysyms::Hyper_R => Key::Hyper,
|
||||||
|
|
||||||
// XKB function and modifier keys
|
// XKB function and modifier keys
|
||||||
// keysyms::XKB_KEY_ISO_Lock => Key::IsoLock,
|
// keysyms::ISO_Lock => Key::IsoLock,
|
||||||
// keysyms::XKB_KEY_ISO_Level2_Latch => Key::IsoLevel2Latch,
|
// keysyms::ISO_Level2_Latch => Key::IsoLevel2Latch,
|
||||||
keysyms::XKB_KEY_ISO_Level3_Shift => Key::AltGraph,
|
keysyms::ISO_Level3_Shift => Key::AltGraph,
|
||||||
keysyms::XKB_KEY_ISO_Level3_Latch => Key::AltGraph,
|
keysyms::ISO_Level3_Latch => Key::AltGraph,
|
||||||
keysyms::XKB_KEY_ISO_Level3_Lock => Key::AltGraph,
|
keysyms::ISO_Level3_Lock => Key::AltGraph,
|
||||||
// keysyms::XKB_KEY_ISO_Level5_Shift => Key::IsoLevel5Shift,
|
// keysyms::ISO_Level5_Shift => Key::IsoLevel5Shift,
|
||||||
// keysyms::XKB_KEY_ISO_Level5_Latch => Key::IsoLevel5Latch,
|
// keysyms::ISO_Level5_Latch => Key::IsoLevel5Latch,
|
||||||
// keysyms::XKB_KEY_ISO_Level5_Lock => Key::IsoLevel5Lock,
|
// keysyms::ISO_Level5_Lock => Key::IsoLevel5Lock,
|
||||||
// keysyms::XKB_KEY_ISO_Group_Shift => Key::IsoGroupShift,
|
// keysyms::ISO_Group_Shift => Key::IsoGroupShift,
|
||||||
// keysyms::XKB_KEY_ISO_Group_Latch => Key::IsoGroupLatch,
|
// keysyms::ISO_Group_Latch => Key::IsoGroupLatch,
|
||||||
// keysyms::XKB_KEY_ISO_Group_Lock => Key::IsoGroupLock,
|
// keysyms::ISO_Group_Lock => Key::IsoGroupLock,
|
||||||
keysyms::XKB_KEY_ISO_Next_Group => Key::GroupNext,
|
keysyms::ISO_Next_Group => Key::GroupNext,
|
||||||
// keysyms::XKB_KEY_ISO_Next_Group_Lock => Key::GroupNextLock,
|
// keysyms::ISO_Next_Group_Lock => Key::GroupNextLock,
|
||||||
keysyms::XKB_KEY_ISO_Prev_Group => Key::GroupPrevious,
|
keysyms::ISO_Prev_Group => Key::GroupPrevious,
|
||||||
// keysyms::XKB_KEY_ISO_Prev_Group_Lock => Key::GroupPreviousLock,
|
// keysyms::ISO_Prev_Group_Lock => Key::GroupPreviousLock,
|
||||||
keysyms::XKB_KEY_ISO_First_Group => Key::GroupFirst,
|
keysyms::ISO_First_Group => Key::GroupFirst,
|
||||||
// keysyms::XKB_KEY_ISO_First_Group_Lock => Key::GroupFirstLock,
|
// keysyms::ISO_First_Group_Lock => Key::GroupFirstLock,
|
||||||
keysyms::XKB_KEY_ISO_Last_Group => Key::GroupLast,
|
keysyms::ISO_Last_Group => Key::GroupLast,
|
||||||
// keysyms::XKB_KEY_ISO_Last_Group_Lock => Key::GroupLastLock,
|
// keysyms::ISO_Last_Group_Lock => Key::GroupLastLock,
|
||||||
//
|
//
|
||||||
keysyms::XKB_KEY_ISO_Left_Tab => Key::Tab,
|
keysyms::ISO_Left_Tab => Key::Tab,
|
||||||
// keysyms::XKB_KEY_ISO_Move_Line_Up => Key::IsoMoveLineUp,
|
// keysyms::ISO_Move_Line_Up => Key::IsoMoveLineUp,
|
||||||
// keysyms::XKB_KEY_ISO_Move_Line_Down => Key::IsoMoveLineDown,
|
// keysyms::ISO_Move_Line_Down => Key::IsoMoveLineDown,
|
||||||
// keysyms::XKB_KEY_ISO_Partial_Line_Up => Key::IsoPartialLineUp,
|
// keysyms::ISO_Partial_Line_Up => Key::IsoPartialLineUp,
|
||||||
// keysyms::XKB_KEY_ISO_Partial_Line_Down => Key::IsoPartialLineDown,
|
// keysyms::ISO_Partial_Line_Down => Key::IsoPartialLineDown,
|
||||||
// keysyms::XKB_KEY_ISO_Partial_Space_Left => Key::IsoPartialSpaceLeft,
|
// keysyms::ISO_Partial_Space_Left => Key::IsoPartialSpaceLeft,
|
||||||
// keysyms::XKB_KEY_ISO_Partial_Space_Right => Key::IsoPartialSpaceRight,
|
// keysyms::ISO_Partial_Space_Right => Key::IsoPartialSpaceRight,
|
||||||
// keysyms::XKB_KEY_ISO_Set_Margin_Left => Key::IsoSetMarginLeft,
|
// keysyms::ISO_Set_Margin_Left => Key::IsoSetMarginLeft,
|
||||||
// keysyms::XKB_KEY_ISO_Set_Margin_Right => Key::IsoSetMarginRight,
|
// keysyms::ISO_Set_Margin_Right => Key::IsoSetMarginRight,
|
||||||
// keysyms::XKB_KEY_ISO_Release_Margin_Left => Key::IsoReleaseMarginLeft,
|
// keysyms::ISO_Release_Margin_Left => Key::IsoReleaseMarginLeft,
|
||||||
// keysyms::XKB_KEY_ISO_Release_Margin_Right => Key::IsoReleaseMarginRight,
|
// keysyms::ISO_Release_Margin_Right => Key::IsoReleaseMarginRight,
|
||||||
// keysyms::XKB_KEY_ISO_Release_Both_Margins => Key::IsoReleaseBothMargins,
|
// keysyms::ISO_Release_Both_Margins => Key::IsoReleaseBothMargins,
|
||||||
// keysyms::XKB_KEY_ISO_Fast_Cursor_Left => Key::IsoFastCursorLeft,
|
// keysyms::ISO_Fast_Cursor_Left => Key::IsoFastCursorLeft,
|
||||||
// keysyms::XKB_KEY_ISO_Fast_Cursor_Right => Key::IsoFastCursorRight,
|
// keysyms::ISO_Fast_Cursor_Right => Key::IsoFastCursorRight,
|
||||||
// keysyms::XKB_KEY_ISO_Fast_Cursor_Up => Key::IsoFastCursorUp,
|
// keysyms::ISO_Fast_Cursor_Up => Key::IsoFastCursorUp,
|
||||||
// keysyms::XKB_KEY_ISO_Fast_Cursor_Down => Key::IsoFastCursorDown,
|
// keysyms::ISO_Fast_Cursor_Down => Key::IsoFastCursorDown,
|
||||||
// keysyms::XKB_KEY_ISO_Continuous_Underline => Key::IsoContinuousUnderline,
|
// keysyms::ISO_Continuous_Underline => Key::IsoContinuousUnderline,
|
||||||
// keysyms::XKB_KEY_ISO_Discontinuous_Underline => Key::IsoDiscontinuousUnderline,
|
// keysyms::ISO_Discontinuous_Underline => Key::IsoDiscontinuousUnderline,
|
||||||
// keysyms::XKB_KEY_ISO_Emphasize => Key::IsoEmphasize,
|
// keysyms::ISO_Emphasize => Key::IsoEmphasize,
|
||||||
// keysyms::XKB_KEY_ISO_Center_Object => Key::IsoCenterObject,
|
// keysyms::ISO_Center_Object => Key::IsoCenterObject,
|
||||||
keysyms::XKB_KEY_ISO_Enter => Key::Enter,
|
keysyms::ISO_Enter => Key::Enter,
|
||||||
|
|
||||||
// XKB_KEY_dead_grave..XKB_KEY_dead_currency
|
// dead_grave..dead_currency
|
||||||
|
|
||||||
// XKB_KEY_dead_lowline..XKB_KEY_dead_longsolidusoverlay
|
// dead_lowline..dead_longsolidusoverlay
|
||||||
|
|
||||||
// XKB_KEY_dead_a..XKB_KEY_dead_capital_schwa
|
// dead_a..dead_capital_schwa
|
||||||
|
|
||||||
// XKB_KEY_dead_greek
|
// dead_greek
|
||||||
|
|
||||||
// XKB_KEY_First_Virtual_Screen..XKB_KEY_Terminate_Server
|
// First_Virtual_Screen..Terminate_Server
|
||||||
|
|
||||||
// XKB_KEY_AccessX_Enable..XKB_KEY_AudibleBell_Enable
|
// AccessX_Enable..AudibleBell_Enable
|
||||||
|
|
||||||
// XKB_KEY_Pointer_Left..XKB_KEY_Pointer_Drag5
|
// Pointer_Left..Pointer_Drag5
|
||||||
|
|
||||||
// XKB_KEY_Pointer_EnableKeys..XKB_KEY_Pointer_DfltBtnPrev
|
// Pointer_EnableKeys..Pointer_DfltBtnPrev
|
||||||
|
|
||||||
// XKB_KEY_ch..XKB_KEY_C_H
|
// ch..C_H
|
||||||
|
|
||||||
// 3270 terminal keys
|
// 3270 terminal keys
|
||||||
// keysyms::XKB_KEY_3270_Duplicate => Key::Duplicate,
|
// keysyms::3270_Duplicate => Key::Duplicate,
|
||||||
// keysyms::XKB_KEY_3270_FieldMark => Key::FieldMark,
|
// keysyms::3270_FieldMark => Key::FieldMark,
|
||||||
// keysyms::XKB_KEY_3270_Right2 => Key::Right2,
|
// keysyms::3270_Right2 => Key::Right2,
|
||||||
// keysyms::XKB_KEY_3270_Left2 => Key::Left2,
|
// keysyms::3270_Left2 => Key::Left2,
|
||||||
// keysyms::XKB_KEY_3270_BackTab => Key::BackTab,
|
// keysyms::3270_BackTab => Key::BackTab,
|
||||||
keysyms::XKB_KEY_3270_EraseEOF => Key::EraseEof,
|
keysyms::_3270_EraseEOF => Key::EraseEof,
|
||||||
// keysyms::XKB_KEY_3270_EraseInput => Key::EraseInput,
|
// keysyms::3270_EraseInput => Key::EraseInput,
|
||||||
// keysyms::XKB_KEY_3270_Reset => Key::Reset,
|
// keysyms::3270_Reset => Key::Reset,
|
||||||
// keysyms::XKB_KEY_3270_Quit => Key::Quit,
|
// keysyms::3270_Quit => Key::Quit,
|
||||||
// keysyms::XKB_KEY_3270_PA1 => Key::Pa1,
|
// keysyms::3270_PA1 => Key::Pa1,
|
||||||
// keysyms::XKB_KEY_3270_PA2 => Key::Pa2,
|
// keysyms::3270_PA2 => Key::Pa2,
|
||||||
// keysyms::XKB_KEY_3270_PA3 => Key::Pa3,
|
// keysyms::3270_PA3 => Key::Pa3,
|
||||||
// keysyms::XKB_KEY_3270_Test => Key::Test,
|
// keysyms::3270_Test => Key::Test,
|
||||||
keysyms::XKB_KEY_3270_Attn => Key::Attn,
|
keysyms::_3270_Attn => Key::Attn,
|
||||||
// keysyms::XKB_KEY_3270_CursorBlink => Key::CursorBlink,
|
// keysyms::3270_CursorBlink => Key::CursorBlink,
|
||||||
// keysyms::XKB_KEY_3270_AltCursor => Key::AltCursor,
|
// keysyms::3270_AltCursor => Key::AltCursor,
|
||||||
// keysyms::XKB_KEY_3270_KeyClick => Key::KeyClick,
|
// keysyms::3270_KeyClick => Key::KeyClick,
|
||||||
// keysyms::XKB_KEY_3270_Jump => Key::Jump,
|
// keysyms::3270_Jump => Key::Jump,
|
||||||
// keysyms::XKB_KEY_3270_Ident => Key::Ident,
|
// keysyms::3270_Ident => Key::Ident,
|
||||||
// keysyms::XKB_KEY_3270_Rule => Key::Rule,
|
// keysyms::3270_Rule => Key::Rule,
|
||||||
// keysyms::XKB_KEY_3270_Copy => Key::Copy,
|
// keysyms::3270_Copy => Key::Copy,
|
||||||
keysyms::XKB_KEY_3270_Play => Key::Play,
|
keysyms::_3270_Play => Key::Play,
|
||||||
// keysyms::XKB_KEY_3270_Setup => Key::Setup,
|
// keysyms::3270_Setup => Key::Setup,
|
||||||
// keysyms::XKB_KEY_3270_Record => Key::Record,
|
// keysyms::3270_Record => Key::Record,
|
||||||
// keysyms::XKB_KEY_3270_ChangeScreen => Key::ChangeScreen,
|
// keysyms::3270_ChangeScreen => Key::ChangeScreen,
|
||||||
// keysyms::XKB_KEY_3270_DeleteWord => Key::DeleteWord,
|
// keysyms::3270_DeleteWord => Key::DeleteWord,
|
||||||
keysyms::XKB_KEY_3270_ExSelect => Key::ExSel,
|
keysyms::_3270_ExSelect => Key::ExSel,
|
||||||
keysyms::XKB_KEY_3270_CursorSelect => Key::CrSel,
|
keysyms::_3270_CursorSelect => Key::CrSel,
|
||||||
keysyms::XKB_KEY_3270_PrintScreen => Key::PrintScreen,
|
keysyms::_3270_PrintScreen => Key::PrintScreen,
|
||||||
keysyms::XKB_KEY_3270_Enter => Key::Enter,
|
keysyms::_3270_Enter => Key::Enter,
|
||||||
|
|
||||||
keysyms::XKB_KEY_space => Key::Space,
|
keysyms::space => Key::Space,
|
||||||
// XKB_KEY_exclam..XKB_KEY_Sinh_kunddaliya
|
// exclam..Sinh_kunddaliya
|
||||||
|
|
||||||
// XFree86
|
// XFree86
|
||||||
// keysyms::XKB_KEY_XF86ModeLock => Key::ModeLock,
|
// keysyms::XF86_ModeLock => Key::ModeLock,
|
||||||
|
|
||||||
// XFree86 - Backlight controls
|
// XFree86 - Backlight controls
|
||||||
keysyms::XKB_KEY_XF86MonBrightnessUp => Key::BrightnessUp,
|
keysyms::XF86_MonBrightnessUp => Key::BrightnessUp,
|
||||||
keysyms::XKB_KEY_XF86MonBrightnessDown => Key::BrightnessDown,
|
keysyms::XF86_MonBrightnessDown => Key::BrightnessDown,
|
||||||
// keysyms::XKB_KEY_XF86KbdLightOnOff => Key::LightOnOff,
|
// keysyms::XF86_KbdLightOnOff => Key::LightOnOff,
|
||||||
// keysyms::XKB_KEY_XF86KbdBrightnessUp => Key::KeyboardBrightnessUp,
|
// keysyms::XF86_KbdBrightnessUp => Key::KeyboardBrightnessUp,
|
||||||
// keysyms::XKB_KEY_XF86KbdBrightnessDown => Key::KeyboardBrightnessDown,
|
// keysyms::XF86_KbdBrightnessDown => Key::KeyboardBrightnessDown,
|
||||||
|
|
||||||
// XFree86 - "Internet"
|
// XFree86 - "Internet"
|
||||||
keysyms::XKB_KEY_XF86Standby => Key::Standby,
|
keysyms::XF86_Standby => Key::Standby,
|
||||||
keysyms::XKB_KEY_XF86AudioLowerVolume => Key::AudioVolumeDown,
|
keysyms::XF86_AudioLowerVolume => Key::AudioVolumeDown,
|
||||||
keysyms::XKB_KEY_XF86AudioRaiseVolume => Key::AudioVolumeUp,
|
keysyms::XF86_AudioRaiseVolume => Key::AudioVolumeUp,
|
||||||
keysyms::XKB_KEY_XF86AudioPlay => Key::MediaPlay,
|
keysyms::XF86_AudioPlay => Key::MediaPlay,
|
||||||
keysyms::XKB_KEY_XF86AudioStop => Key::MediaStop,
|
keysyms::XF86_AudioStop => Key::MediaStop,
|
||||||
keysyms::XKB_KEY_XF86AudioPrev => Key::MediaTrackPrevious,
|
keysyms::XF86_AudioPrev => Key::MediaTrackPrevious,
|
||||||
keysyms::XKB_KEY_XF86AudioNext => Key::MediaTrackNext,
|
keysyms::XF86_AudioNext => Key::MediaTrackNext,
|
||||||
keysyms::XKB_KEY_XF86HomePage => Key::BrowserHome,
|
keysyms::XF86_HomePage => Key::BrowserHome,
|
||||||
keysyms::XKB_KEY_XF86Mail => Key::LaunchMail,
|
keysyms::XF86_Mail => Key::LaunchMail,
|
||||||
// keysyms::XKB_KEY_XF86Start => Key::Start,
|
// keysyms::XF86_Start => Key::Start,
|
||||||
keysyms::XKB_KEY_XF86Search => Key::BrowserSearch,
|
keysyms::XF86_Search => Key::BrowserSearch,
|
||||||
keysyms::XKB_KEY_XF86AudioRecord => Key::MediaRecord,
|
keysyms::XF86_AudioRecord => Key::MediaRecord,
|
||||||
|
|
||||||
// XFree86 - PDA
|
// XFree86 - PDA
|
||||||
keysyms::XKB_KEY_XF86Calculator => Key::LaunchApplication2,
|
keysyms::XF86_Calculator => Key::LaunchApplication2,
|
||||||
// keysyms::XKB_KEY_XF86Memo => Key::Memo,
|
// keysyms::XF86_Memo => Key::Memo,
|
||||||
// keysyms::XKB_KEY_XF86ToDoList => Key::ToDoList,
|
// keysyms::XF86_ToDoList => Key::ToDoList,
|
||||||
keysyms::XKB_KEY_XF86Calendar => Key::LaunchCalendar,
|
keysyms::XF86_Calendar => Key::LaunchCalendar,
|
||||||
keysyms::XKB_KEY_XF86PowerDown => Key::Power,
|
keysyms::XF86_PowerDown => Key::Power,
|
||||||
// keysyms::XKB_KEY_XF86ContrastAdjust => Key::AdjustContrast,
|
// keysyms::XF86_ContrastAdjust => Key::AdjustContrast,
|
||||||
// keysyms::XKB_KEY_XF86RockerUp => Key::RockerUp,
|
// keysyms::XF86_RockerUp => Key::RockerUp,
|
||||||
// keysyms::XKB_KEY_XF86RockerDown => Key::RockerDown,
|
// keysyms::XF86_RockerDown => Key::RockerDown,
|
||||||
// keysyms::XKB_KEY_XF86RockerEnter => Key::RockerEnter,
|
// keysyms::XF86_RockerEnter => Key::RockerEnter,
|
||||||
|
|
||||||
// XFree86 - More "Internet"
|
// XFree86 - More "Internet"
|
||||||
keysyms::XKB_KEY_XF86Back => Key::BrowserBack,
|
keysyms::XF86_Back => Key::BrowserBack,
|
||||||
keysyms::XKB_KEY_XF86Forward => Key::BrowserForward,
|
keysyms::XF86_Forward => Key::BrowserForward,
|
||||||
// keysyms::XKB_KEY_XF86Stop => Key::Stop,
|
// keysyms::XF86_Stop => Key::Stop,
|
||||||
keysyms::XKB_KEY_XF86Refresh => Key::BrowserRefresh,
|
keysyms::XF86_Refresh => Key::BrowserRefresh,
|
||||||
keysyms::XKB_KEY_XF86PowerOff => Key::Power,
|
keysyms::XF86_PowerOff => Key::Power,
|
||||||
keysyms::XKB_KEY_XF86WakeUp => Key::WakeUp,
|
keysyms::XF86_WakeUp => Key::WakeUp,
|
||||||
keysyms::XKB_KEY_XF86Eject => Key::Eject,
|
keysyms::XF86_Eject => Key::Eject,
|
||||||
keysyms::XKB_KEY_XF86ScreenSaver => Key::LaunchScreenSaver,
|
keysyms::XF86_ScreenSaver => Key::LaunchScreenSaver,
|
||||||
keysyms::XKB_KEY_XF86WWW => Key::LaunchWebBrowser,
|
keysyms::XF86_WWW => Key::LaunchWebBrowser,
|
||||||
keysyms::XKB_KEY_XF86Sleep => Key::Standby,
|
keysyms::XF86_Sleep => Key::Standby,
|
||||||
keysyms::XKB_KEY_XF86Favorites => Key::BrowserFavorites,
|
keysyms::XF86_Favorites => Key::BrowserFavorites,
|
||||||
keysyms::XKB_KEY_XF86AudioPause => Key::MediaPause,
|
keysyms::XF86_AudioPause => Key::MediaPause,
|
||||||
// keysyms::XKB_KEY_XF86AudioMedia => Key::AudioMedia,
|
// keysyms::XF86_AudioMedia => Key::AudioMedia,
|
||||||
keysyms::XKB_KEY_XF86MyComputer => Key::LaunchApplication1,
|
keysyms::XF86_MyComputer => Key::LaunchApplication1,
|
||||||
// keysyms::XKB_KEY_XF86VendorHome => Key::VendorHome,
|
// keysyms::XF86_VendorHome => Key::VendorHome,
|
||||||
// keysyms::XKB_KEY_XF86LightBulb => Key::LightBulb,
|
// keysyms::XF86_LightBulb => Key::LightBulb,
|
||||||
// keysyms::XKB_KEY_XF86Shop => Key::BrowserShop,
|
// keysyms::XF86_Shop => Key::BrowserShop,
|
||||||
// keysyms::XKB_KEY_XF86History => Key::BrowserHistory,
|
// keysyms::XF86_History => Key::BrowserHistory,
|
||||||
// keysyms::XKB_KEY_XF86OpenURL => Key::OpenUrl,
|
// keysyms::XF86_OpenURL => Key::OpenUrl,
|
||||||
// keysyms::XKB_KEY_XF86AddFavorite => Key::AddFavorite,
|
// keysyms::XF86_AddFavorite => Key::AddFavorite,
|
||||||
// keysyms::XKB_KEY_XF86HotLinks => Key::HotLinks,
|
// keysyms::XF86_HotLinks => Key::HotLinks,
|
||||||
// keysyms::XKB_KEY_XF86BrightnessAdjust => Key::BrightnessAdjust,
|
// keysyms::XF86_BrightnessAdjust => Key::BrightnessAdjust,
|
||||||
// keysyms::XKB_KEY_XF86Finance => Key::BrowserFinance,
|
// keysyms::XF86_Finance => Key::BrowserFinance,
|
||||||
// keysyms::XKB_KEY_XF86Community => Key::BrowserCommunity,
|
// keysyms::XF86_Community => Key::BrowserCommunity,
|
||||||
keysyms::XKB_KEY_XF86AudioRewind => Key::MediaRewind,
|
keysyms::XF86_AudioRewind => Key::MediaRewind,
|
||||||
// keysyms::XKB_KEY_XF86BackForward => Key::???,
|
// keysyms::XF86_BackForward => Key::???,
|
||||||
// XKB_KEY_XF86Launch0..XKB_KEY_XF86LaunchF
|
// XF86_Launch0..XF86_LaunchF
|
||||||
|
|
||||||
// XKB_KEY_XF86ApplicationLeft..XKB_KEY_XF86CD
|
// XF86_ApplicationLeft..XF86_CD
|
||||||
keysyms::XKB_KEY_XF86Calculater => Key::LaunchApplication2, // Nice typo, libxkbcommon :)
|
keysyms::XF86_Calculater => Key::LaunchApplication2, // Nice typo, libxkbcommon :)
|
||||||
// XKB_KEY_XF86Clear
|
// XF86_Clear
|
||||||
keysyms::XKB_KEY_XF86Close => Key::Close,
|
keysyms::XF86_Close => Key::Close,
|
||||||
keysyms::XKB_KEY_XF86Copy => Key::Copy,
|
keysyms::XF86_Copy => Key::Copy,
|
||||||
keysyms::XKB_KEY_XF86Cut => Key::Cut,
|
keysyms::XF86_Cut => Key::Cut,
|
||||||
// XKB_KEY_XF86Display..XKB_KEY_XF86Documents
|
// XF86_Display..XF86_Documents
|
||||||
keysyms::XKB_KEY_XF86Excel => Key::LaunchSpreadsheet,
|
keysyms::XF86_Excel => Key::LaunchSpreadsheet,
|
||||||
// XKB_KEY_XF86Explorer..XKB_KEY_XF86iTouch
|
// XF86_Explorer..XF86iTouch
|
||||||
keysyms::XKB_KEY_XF86LogOff => Key::LogOff,
|
keysyms::XF86_LogOff => Key::LogOff,
|
||||||
// XKB_KEY_XF86Market..XKB_KEY_XF86MenuPB
|
// XF86_Market..XF86_MenuPB
|
||||||
keysyms::XKB_KEY_XF86MySites => Key::BrowserFavorites,
|
keysyms::XF86_MySites => Key::BrowserFavorites,
|
||||||
keysyms::XKB_KEY_XF86New => Key::New,
|
keysyms::XF86_New => Key::New,
|
||||||
// XKB_KEY_XF86News..XKB_KEY_XF86OfficeHome
|
// XF86_News..XF86_OfficeHome
|
||||||
keysyms::XKB_KEY_XF86Open => Key::Open,
|
keysyms::XF86_Open => Key::Open,
|
||||||
// XKB_KEY_XF86Option
|
// XF86_Option
|
||||||
keysyms::XKB_KEY_XF86Paste => Key::Paste,
|
keysyms::XF86_Paste => Key::Paste,
|
||||||
keysyms::XKB_KEY_XF86Phone => Key::LaunchPhone,
|
keysyms::XF86_Phone => Key::LaunchPhone,
|
||||||
// XKB_KEY_XF86Q
|
// XF86_Q
|
||||||
keysyms::XKB_KEY_XF86Reply => Key::MailReply,
|
keysyms::XF86_Reply => Key::MailReply,
|
||||||
keysyms::XKB_KEY_XF86Reload => Key::BrowserRefresh,
|
keysyms::XF86_Reload => Key::BrowserRefresh,
|
||||||
// XKB_KEY_XF86RotateWindows..XKB_KEY_XF86RotationKB
|
// XF86_RotateWindows..XF86_RotationKB
|
||||||
keysyms::XKB_KEY_XF86Save => Key::Save,
|
keysyms::XF86_Save => Key::Save,
|
||||||
// XKB_KEY_XF86ScrollUp..XKB_KEY_XF86ScrollClick
|
// XF86_ScrollUp..XF86_ScrollClick
|
||||||
keysyms::XKB_KEY_XF86Send => Key::MailSend,
|
keysyms::XF86_Send => Key::MailSend,
|
||||||
keysyms::XKB_KEY_XF86Spell => Key::SpellCheck,
|
keysyms::XF86_Spell => Key::SpellCheck,
|
||||||
keysyms::XKB_KEY_XF86SplitScreen => Key::SplitScreenToggle,
|
keysyms::XF86_SplitScreen => Key::SplitScreenToggle,
|
||||||
// XKB_KEY_XF86Support..XKB_KEY_XF86User2KB
|
// XF86_Support..XF86_User2KB
|
||||||
keysyms::XKB_KEY_XF86Video => Key::LaunchMediaPlayer,
|
keysyms::XF86_Video => Key::LaunchMediaPlayer,
|
||||||
// XKB_KEY_XF86WheelButton
|
// XF86_WheelButton
|
||||||
keysyms::XKB_KEY_XF86Word => Key::LaunchWordProcessor,
|
keysyms::XF86_Word => Key::LaunchWordProcessor,
|
||||||
// XKB_KEY_XF86Xfer
|
// XF86_Xfer
|
||||||
keysyms::XKB_KEY_XF86ZoomIn => Key::ZoomIn,
|
keysyms::XF86_ZoomIn => Key::ZoomIn,
|
||||||
keysyms::XKB_KEY_XF86ZoomOut => Key::ZoomOut,
|
keysyms::XF86_ZoomOut => Key::ZoomOut,
|
||||||
|
|
||||||
// XKB_KEY_XF86Away..XKB_KEY_XF86Messenger
|
// XF86_Away..XF86_Messenger
|
||||||
keysyms::XKB_KEY_XF86WebCam => Key::LaunchWebCam,
|
keysyms::XF86_WebCam => Key::LaunchWebCam,
|
||||||
keysyms::XKB_KEY_XF86MailForward => Key::MailForward,
|
keysyms::XF86_MailForward => Key::MailForward,
|
||||||
// XKB_KEY_XF86Pictures
|
// XF86_Pictures
|
||||||
keysyms::XKB_KEY_XF86Music => Key::LaunchMusicPlayer,
|
keysyms::XF86_Music => Key::LaunchMusicPlayer,
|
||||||
|
|
||||||
// XKB_KEY_XF86Battery..XKB_KEY_XF86UWB
|
// XF86_Battery..XF86_UWB
|
||||||
//
|
//
|
||||||
keysyms::XKB_KEY_XF86AudioForward => Key::MediaFastForward,
|
keysyms::XF86_AudioForward => Key::MediaFastForward,
|
||||||
// XKB_KEY_XF86AudioRepeat
|
// XF86_AudioRepeat
|
||||||
keysyms::XKB_KEY_XF86AudioRandomPlay => Key::RandomToggle,
|
keysyms::XF86_AudioRandomPlay => Key::RandomToggle,
|
||||||
keysyms::XKB_KEY_XF86Subtitle => Key::Subtitle,
|
keysyms::XF86_Subtitle => Key::Subtitle,
|
||||||
keysyms::XKB_KEY_XF86AudioCycleTrack => Key::MediaAudioTrack,
|
keysyms::XF86_AudioCycleTrack => Key::MediaAudioTrack,
|
||||||
// XKB_KEY_XF86CycleAngle..XKB_KEY_XF86Blue
|
// XF86_CycleAngle..XF86_Blue
|
||||||
//
|
//
|
||||||
keysyms::XKB_KEY_XF86Suspend => Key::Standby,
|
keysyms::XF86_Suspend => Key::Standby,
|
||||||
keysyms::XKB_KEY_XF86Hibernate => Key::Hibernate,
|
keysyms::XF86_Hibernate => Key::Hibernate,
|
||||||
// XKB_KEY_XF86TouchpadToggle..XKB_KEY_XF86TouchpadOff
|
// XF86_TouchpadToggle..XF86_TouchpadOff
|
||||||
//
|
//
|
||||||
keysyms::XKB_KEY_XF86AudioMute => Key::AudioVolumeMute,
|
keysyms::XF86_AudioMute => Key::AudioVolumeMute,
|
||||||
|
|
||||||
// XKB_KEY_XF86Switch_VT_1..XKB_KEY_XF86Switch_VT_12
|
// XF86_Switch_VT_1..XF86_Switch_VT_12
|
||||||
|
|
||||||
// XKB_KEY_XF86Ungrab..XKB_KEY_XF86ClearGrab
|
// XF86_Ungrab..XF86_ClearGrab
|
||||||
keysyms::XKB_KEY_XF86Next_VMode => Key::VideoModeNext,
|
keysyms::XF86_Next_VMode => Key::VideoModeNext,
|
||||||
// keysyms::XKB_KEY_XF86Prev_VMode => Key::VideoModePrevious,
|
// keysyms::XF86_Prev_VMode => Key::VideoModePrevious,
|
||||||
// XKB_KEY_XF86LogWindowTree..XKB_KEY_XF86LogGrabInfo
|
// XF86_LogWindowTree..XF86_LogGrabInfo
|
||||||
|
|
||||||
// XKB_KEY_SunFA_Grave..XKB_KEY_SunFA_Cedilla
|
// SunFA_Grave..SunFA_Cedilla
|
||||||
|
|
||||||
// keysyms::XKB_KEY_SunF36 => Key::F36 | Key::F11,
|
// keysyms::SunF36 => Key::F36 | Key::F11,
|
||||||
// keysyms::XKB_KEY_SunF37 => Key::F37 | Key::F12,
|
// keysyms::SunF37 => Key::F37 | Key::F12,
|
||||||
|
|
||||||
// keysyms::XKB_KEY_SunSys_Req => Key::PrintScreen,
|
// keysyms::SunSys_Req => Key::PrintScreen,
|
||||||
// The next couple of xkb (until XKB_KEY_SunStop) are already handled.
|
// The next couple of xkb (until SunStop) are already handled.
|
||||||
// XKB_KEY_SunPrint_Screen..XKB_KEY_SunPageDown
|
// SunPrint_Screen..SunPageDown
|
||||||
|
|
||||||
// XKB_KEY_SunUndo..XKB_KEY_SunFront
|
// SunUndo..SunFront
|
||||||
keysyms::XKB_KEY_SunCopy => Key::Copy,
|
keysyms::SUN_Copy => Key::Copy,
|
||||||
keysyms::XKB_KEY_SunOpen => Key::Open,
|
keysyms::SUN_Open => Key::Open,
|
||||||
keysyms::XKB_KEY_SunPaste => Key::Paste,
|
keysyms::SUN_Paste => Key::Paste,
|
||||||
keysyms::XKB_KEY_SunCut => Key::Cut,
|
keysyms::SUN_Cut => Key::Cut,
|
||||||
|
|
||||||
// XKB_KEY_SunPowerSwitch
|
// SunPowerSwitch
|
||||||
keysyms::XKB_KEY_SunAudioLowerVolume => Key::AudioVolumeDown,
|
keysyms::SUN_AudioLowerVolume => Key::AudioVolumeDown,
|
||||||
keysyms::XKB_KEY_SunAudioMute => Key::AudioVolumeMute,
|
keysyms::SUN_AudioMute => Key::AudioVolumeMute,
|
||||||
keysyms::XKB_KEY_SunAudioRaiseVolume => Key::AudioVolumeUp,
|
keysyms::SUN_AudioRaiseVolume => Key::AudioVolumeUp,
|
||||||
// XKB_KEY_SunVideoDegauss
|
// SUN_VideoDegauss
|
||||||
keysyms::XKB_KEY_SunVideoLowerBrightness => Key::BrightnessDown,
|
keysyms::SUN_VideoLowerBrightness => Key::BrightnessDown,
|
||||||
keysyms::XKB_KEY_SunVideoRaiseBrightness => Key::BrightnessUp,
|
keysyms::SUN_VideoRaiseBrightness => Key::BrightnessUp,
|
||||||
// XKB_KEY_SunPowerSwitchShift
|
// SunPowerSwitchShift
|
||||||
//
|
//
|
||||||
0 => Key::Unidentified(NativeKey::Unidentified),
|
0 => Key::Unidentified(NativeKey::Unidentified),
|
||||||
_ => Key::Unidentified(NativeKey::Xkb(keysym)),
|
_ => Key::Unidentified(NativeKey::Xkb(keysym)),
|
||||||
|
@ -835,53 +835,53 @@ pub fn keysym_to_key(keysym: u32) -> Key {
|
||||||
pub fn keysym_location(keysym: u32) -> KeyLocation {
|
pub fn keysym_location(keysym: u32) -> KeyLocation {
|
||||||
use xkbcommon_dl::keysyms;
|
use xkbcommon_dl::keysyms;
|
||||||
match keysym {
|
match keysym {
|
||||||
keysyms::XKB_KEY_Shift_L
|
keysyms::Shift_L
|
||||||
| keysyms::XKB_KEY_Control_L
|
| keysyms::Control_L
|
||||||
| keysyms::XKB_KEY_Meta_L
|
| keysyms::Meta_L
|
||||||
| keysyms::XKB_KEY_Alt_L
|
| keysyms::Alt_L
|
||||||
| keysyms::XKB_KEY_Super_L
|
| keysyms::Super_L
|
||||||
| keysyms::XKB_KEY_Hyper_L => KeyLocation::Left,
|
| keysyms::Hyper_L => KeyLocation::Left,
|
||||||
keysyms::XKB_KEY_Shift_R
|
keysyms::Shift_R
|
||||||
| keysyms::XKB_KEY_Control_R
|
| keysyms::Control_R
|
||||||
| keysyms::XKB_KEY_Meta_R
|
| keysyms::Meta_R
|
||||||
| keysyms::XKB_KEY_Alt_R
|
| keysyms::Alt_R
|
||||||
| keysyms::XKB_KEY_Super_R
|
| keysyms::Super_R
|
||||||
| keysyms::XKB_KEY_Hyper_R => KeyLocation::Right,
|
| keysyms::Hyper_R => KeyLocation::Right,
|
||||||
keysyms::XKB_KEY_KP_0
|
keysyms::KP_0
|
||||||
| keysyms::XKB_KEY_KP_1
|
| keysyms::KP_1
|
||||||
| keysyms::XKB_KEY_KP_2
|
| keysyms::KP_2
|
||||||
| keysyms::XKB_KEY_KP_3
|
| keysyms::KP_3
|
||||||
| keysyms::XKB_KEY_KP_4
|
| keysyms::KP_4
|
||||||
| keysyms::XKB_KEY_KP_5
|
| keysyms::KP_5
|
||||||
| keysyms::XKB_KEY_KP_6
|
| keysyms::KP_6
|
||||||
| keysyms::XKB_KEY_KP_7
|
| keysyms::KP_7
|
||||||
| keysyms::XKB_KEY_KP_8
|
| keysyms::KP_8
|
||||||
| keysyms::XKB_KEY_KP_9
|
| keysyms::KP_9
|
||||||
| keysyms::XKB_KEY_KP_Space
|
| keysyms::KP_Space
|
||||||
| keysyms::XKB_KEY_KP_Tab
|
| keysyms::KP_Tab
|
||||||
| keysyms::XKB_KEY_KP_Enter
|
| keysyms::KP_Enter
|
||||||
| keysyms::XKB_KEY_KP_F1
|
| keysyms::KP_F1
|
||||||
| keysyms::XKB_KEY_KP_F2
|
| keysyms::KP_F2
|
||||||
| keysyms::XKB_KEY_KP_F3
|
| keysyms::KP_F3
|
||||||
| keysyms::XKB_KEY_KP_F4
|
| keysyms::KP_F4
|
||||||
| keysyms::XKB_KEY_KP_Home
|
| keysyms::KP_Home
|
||||||
| keysyms::XKB_KEY_KP_Left
|
| keysyms::KP_Left
|
||||||
| keysyms::XKB_KEY_KP_Up
|
| keysyms::KP_Up
|
||||||
| keysyms::XKB_KEY_KP_Right
|
| keysyms::KP_Right
|
||||||
| keysyms::XKB_KEY_KP_Down
|
| keysyms::KP_Down
|
||||||
| keysyms::XKB_KEY_KP_Page_Up
|
| keysyms::KP_Page_Up
|
||||||
| keysyms::XKB_KEY_KP_Page_Down
|
| keysyms::KP_Page_Down
|
||||||
| keysyms::XKB_KEY_KP_End
|
| keysyms::KP_End
|
||||||
| keysyms::XKB_KEY_KP_Begin
|
| keysyms::KP_Begin
|
||||||
| keysyms::XKB_KEY_KP_Insert
|
| keysyms::KP_Insert
|
||||||
| keysyms::XKB_KEY_KP_Delete
|
| keysyms::KP_Delete
|
||||||
| keysyms::XKB_KEY_KP_Equal
|
| keysyms::KP_Equal
|
||||||
| keysyms::XKB_KEY_KP_Multiply
|
| keysyms::KP_Multiply
|
||||||
| keysyms::XKB_KEY_KP_Add
|
| keysyms::KP_Add
|
||||||
| keysyms::XKB_KEY_KP_Separator
|
| keysyms::KP_Separator
|
||||||
| keysyms::XKB_KEY_KP_Subtract
|
| keysyms::KP_Subtract
|
||||||
| keysyms::XKB_KEY_KP_Decimal
|
| keysyms::KP_Decimal
|
||||||
| keysyms::XKB_KEY_KP_Divide => KeyLocation::Numpad,
|
| keysyms::KP_Divide => KeyLocation::Numpad,
|
||||||
_ => KeyLocation::Standard,
|
_ => KeyLocation::Standard,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,14 +6,16 @@ use std::os::unix::ffi::OsStringExt;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
|
||||||
|
use once_cell::sync::Lazy;
|
||||||
use smol_str::SmolStr;
|
use smol_str::SmolStr;
|
||||||
use xkbcommon_dl::{
|
use xkbcommon_dl::{
|
||||||
self as ffi, xkb_state_component, XKBCOMMON_COMPOSE_HANDLE as XKBCH, XKBCOMMON_HANDLE as XKBH,
|
self as ffi, xkb_state_component, xkbcommon_compose_handle, xkbcommon_handle, XkbCommon,
|
||||||
|
XkbCommonCompose,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
use {memmap2::MmapOptions, wayland_backend::io_lifetimes::OwnedFd};
|
use {memmap2::MmapOptions, wayland_backend::io_lifetimes::OwnedFd};
|
||||||
#[cfg(feature = "x11")]
|
#[cfg(feature = "x11")]
|
||||||
use {x11_dl::xlib_xcb::xcb_connection_t, xkbcommon_dl::x11::XKBCOMMON_X11_HANDLE as XKBXH};
|
use {x11_dl::xlib_xcb::xcb_connection_t, xkbcommon_dl::x11::xkbcommon_x11_handle};
|
||||||
|
|
||||||
use crate::event::KeyEvent;
|
use crate::event::KeyEvent;
|
||||||
use crate::platform_impl::common::keymap;
|
use crate::platform_impl::common::keymap;
|
||||||
|
@ -31,6 +33,11 @@ pub fn reset_dead_keys() {
|
||||||
RESET_DEAD_KEYS.store(true, Ordering::SeqCst);
|
RESET_DEAD_KEYS.store(true, Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static XKBH: Lazy<&'static XkbCommon> = Lazy::new(xkbcommon_handle);
|
||||||
|
static XKBCH: Lazy<&'static XkbCommonCompose> = Lazy::new(xkbcommon_compose_handle);
|
||||||
|
#[cfg(feature = "x11")]
|
||||||
|
static XKBXH: Lazy<&'static ffi::x11::XkbCommonX11> = Lazy::new(xkbcommon_x11_handle);
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct KbdState {
|
pub struct KbdState {
|
||||||
#[cfg(feature = "x11")]
|
#[cfg(feature = "x11")]
|
||||||
|
@ -179,7 +186,7 @@ impl KbdState {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new() -> Result<Self, Error> {
|
pub fn new() -> Result<Self, Error> {
|
||||||
if ffi::XKBCOMMON_OPTION.as_ref().is_none() {
|
if ffi::xkbcommon_option().is_none() {
|
||||||
return Err(Error::XKBNotFound);
|
return Err(Error::XKBNotFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue