Add support for numpad keys on linux (#14018)
Fixes https://github.com/zed-industries/zed/issues/12117 Partial application of the changes in https://github.com/zed-industries/zed/pull/13396 Release Notes: - N/A
This commit is contained in:
parent
c22dbbebe2
commit
ba28827de5
1 changed files with 10 additions and 1 deletions
|
@ -640,6 +640,8 @@ impl Keystroke {
|
|||
Keysym::Prior => "pageup".to_owned(),
|
||||
Keysym::Next => "pagedown".to_owned(),
|
||||
Keysym::ISO_Left_Tab => "tab".to_owned(),
|
||||
Keysym::KP_Prior => "pageup".to_owned(),
|
||||
Keysym::KP_Next => "pagedown".to_owned(),
|
||||
|
||||
Keysym::comma => ",".to_owned(),
|
||||
Keysym::period => ".".to_owned(),
|
||||
|
@ -677,7 +679,14 @@ impl Keystroke {
|
|||
Keysym::equal => "=".to_owned(),
|
||||
Keysym::plus => "+".to_owned(),
|
||||
|
||||
_ => xkb::keysym_get_name(key_sym).to_lowercase(),
|
||||
_ => {
|
||||
let name = xkb::keysym_get_name(key_sym).to_lowercase();
|
||||
if key_sym.is_keypad_key() {
|
||||
name.replace("kp_", "")
|
||||
} else {
|
||||
name
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if modifiers.shift {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue