1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 06:42:12 +03:00

support F-Keys with native xcb code

This commit is contained in:
Wez Furlong 2018-03-04 07:32:37 -08:00
parent 41cfcfdb15
commit 6ccf3c98d7

View File

@ -205,6 +205,18 @@ pub fn xcb_keysym_to_keycode(k: xcb_keysym_t) -> KeyCode {
XK_BackSpace | XK_Tab | XK_Linefeed | XK_Return | XK_Escape => {
KeyCode::Char((k & 0xff) as u8 as char)
}
XK_F1 => KeyCode::F(1),
XK_F2 => KeyCode::F(2),
XK_F3 => KeyCode::F(3),
XK_F4 => KeyCode::F(4),
XK_F5 => KeyCode::F(5),
XK_F6 => KeyCode::F(6),
XK_F7 => KeyCode::F(7),
XK_F8 => KeyCode::F(8),
XK_F9 => KeyCode::F(9),
XK_F10 => KeyCode::F(10),
XK_F11 => KeyCode::F(11),
XK_F12 => KeyCode::F(12),
XK_Control_L | XK_Control_R => KeyCode::Control,
XK_Alt_L | XK_Alt_R => KeyCode::Alt,
XK_Meta_L | XK_Meta_R => KeyCode::Meta,