Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Add missing F-key bindings for xkb and Windows. #160

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/backend/shared/xkb/keycodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ pub fn map_key(keysym: u32) -> Key {
XKB_KEY_F22 => F22,
XKB_KEY_F23 => F23,
XKB_KEY_F24 => F24,
XKB_KEY_F25 => F25,
XKB_KEY_F26 => F26,
XKB_KEY_F27 => F27,
XKB_KEY_F28 => F28,
XKB_KEY_F29 => F29,
XKB_KEY_F30 => F30,
XKB_KEY_F31 => F31,
XKB_KEY_F32 => F32,
XKB_KEY_F33 => F33,
XKB_KEY_F34 => F34,
XKB_KEY_F35 => F35,
// not available in keyboard-types
// XKB_KEY_XF86Calculator => LaunchCalculator,
// XKB_KEY_XF86MyComputer | XKB_KEY_XF86Explorer => LaunchMyComputer,
Expand Down
12 changes: 12 additions & 0 deletions src/backend/windows/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,18 @@ fn vk_to_key(vk: VkCode) -> Option<KbKey> {
VK_F10 => KbKey::F10,
VK_F11 => KbKey::F11,
VK_F12 => KbKey::F12,
VK_F13 => KbKey::F13,
VK_F14 => KbKey::F14,
VK_F15 => KbKey::F15,
VK_F16 => KbKey::F16,
VK_F17 => KbKey::F17,
VK_F18 => KbKey::F18,
VK_F19 => KbKey::F19,
VK_F20 => KbKey::F20,
VK_F21 => KbKey::F21,
VK_F22 => KbKey::F22,
VK_F23 => KbKey::F23,
VK_F24 => KbKey::F24,
VK_NUMLOCK => KbKey::NumLock,
VK_SCROLL => KbKey::ScrollLock,
VK_BROWSER_BACK => KbKey::BrowserBack,
Expand Down