Remap backspace key
This commit is contained in:
parent
0894a0ba3c
commit
ca50d28227
|
@ -482,6 +482,7 @@ impl App {
|
|||
) -> Option<&'static str> {
|
||||
use winit::event::VirtualKeyCode::*;
|
||||
match keycode {
|
||||
Back => Some("\x7f"),
|
||||
Up => Some("\x1b[A"),
|
||||
Down => Some("\x1b[B"),
|
||||
Right => Some("\x1b[C"),
|
||||
|
@ -510,8 +511,8 @@ impl App {
|
|||
log::debug!("Received character: {:?}", c);
|
||||
|
||||
match c {
|
||||
'\u{7f}' => {
|
||||
// We use a special escape code for the delete key.
|
||||
'\u{7f}' | '\u{8}' => {
|
||||
// We use a special escape code for the delete and backspace keys.
|
||||
log::debug!("Ignoring.");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue