1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00

keyboard: use more consistent backspace/delete names for physkeycodes

refs: #1495
This commit is contained in:
Wez Furlong 2022-01-03 11:05:38 -07:00
parent 34dd0b6688
commit 2890e4e723
4 changed files with 11 additions and 11 deletions

View File

@ -204,7 +204,7 @@ pub enum PhysKeyCode {
CapsLock,
Comma,
D,
Delete,
Backspace,
DownArrow,
E,
End,
@ -231,7 +231,7 @@ pub enum PhysKeyCode {
F7,
F8,
F9,
ForwardDelete,
Delete,
Function,
G,
Grave,
@ -409,8 +409,8 @@ impl PhysKeyCode {
Self::Z => KeyCode::Char('z'),
Self::Backslash => KeyCode::Char('\\'),
Self::Comma => KeyCode::Char(','),
Self::Delete => KeyCode::Char('\u{8}'),
Self::KeypadDelete | Self::ForwardDelete => KeyCode::Char('\u{7f}'),
Self::Backspace => KeyCode::Char('\u{8}'),
Self::KeypadDelete | Self::Delete => KeyCode::Char('\u{7f}'),
Self::End => KeyCode::End,
Self::Home => KeyCode::Home,
Self::KeypadEquals | Self::Equal => KeyCode::Char('='),
@ -467,7 +467,7 @@ impl PhysKeyCode {
CapsLock,
Comma,
D,
Delete,
Backspace,
DownArrow,
E,
End,
@ -494,7 +494,7 @@ impl PhysKeyCode {
F7,
F8,
F9,
ForwardDelete,
Delete,
Function,
G,
Grave,

View File

@ -73,7 +73,7 @@ fn build_map() -> HashMap<u16, PhysKeyCode> {
(kVK_Return, PhysKeyCode::Return),
(kVK_Tab, PhysKeyCode::Tab),
(kVK_Space, PhysKeyCode::Space),
(kVK_Delete, PhysKeyCode::Delete),
(kVK_Delete, PhysKeyCode::Backspace),
(kVK_Escape, PhysKeyCode::Escape),
(kVK_Command, PhysKeyCode::LeftWindows),
(kVK_Shift, PhysKeyCode::LeftShift),
@ -108,7 +108,7 @@ fn build_map() -> HashMap<u16, PhysKeyCode> {
(kVK_Help, PhysKeyCode::Help),
(kVK_Home, PhysKeyCode::Home),
(kVK_PageUp, PhysKeyCode::PageUp),
(kVK_ForwardDelete, PhysKeyCode::ForwardDelete),
(kVK_ForwardDelete, PhysKeyCode::Delete),
(kVK_F4, PhysKeyCode::F4),
(kVK_End, PhysKeyCode::End),
(kVK_F2, PhysKeyCode::F2),

View File

@ -146,7 +146,7 @@ fn build_map() -> HashMap<WPARAM, PhysKeyCode> {
(VK_RETURN, PhysKeyCode::Return),
(VK_TAB, PhysKeyCode::Tab),
(VK_SPACE, PhysKeyCode::Space),
(VK_BACK, PhysKeyCode::Delete),
(VK_BACK, PhysKeyCode::Backspace),
(VK_ESCAPE, PhysKeyCode::Escape),
(VK_LWIN, PhysKeyCode::LeftWindows),
(VK_LSHIFT, PhysKeyCode::LeftShift),
@ -181,7 +181,7 @@ fn build_map() -> HashMap<WPARAM, PhysKeyCode> {
(VK_HELP, PhysKeyCode::Help),
(VK_HOME, PhysKeyCode::Home),
(VK_PRIOR, PhysKeyCode::PageUp),
(VK_DELETE, PhysKeyCode::ForwardDelete),
(VK_DELETE, PhysKeyCode::Delete),
(VK_F4, PhysKeyCode::F4),
(VK_END, PhysKeyCode::End),
(VK_F2, PhysKeyCode::F2),

View File

@ -440,7 +440,7 @@ fn build_physkeycode_map(keymap: &xkb::Keymap) -> HashMap<xkb::Keycode, PhysKeyC
("AE11", PhysKeyCode::Minus),
("AE12", PhysKeyCode::Equal),
("BKSL", PhysKeyCode::Backslash),
("BKSP", PhysKeyCode::Delete),
("BKSP", PhysKeyCode::Backspace),
("INS", PhysKeyCode::Insert),
("HOME", PhysKeyCode::Home),
("PGUP", PhysKeyCode::PageUp),