From 23aa9e6da77c9ebc36984079aefbdfea19924507 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Fri, 29 May 2015 20:44:53 -0700 Subject: [PATCH] Update for latest ncurses-rs fix Del and Ins are now correctly reported. --- src/event.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/event.rs b/src/event.rs index 64093aa..04d3abf 100644 --- a/src/event.rs +++ b/src/event.rs @@ -76,9 +76,6 @@ impl Key { 27 => Key::Esc, // `Backspace` sends 127, but Ctrl-H sends `Backspace` 127 | ncurses::KEY_BACKSPACE => Key::Backspace, - // Del and Ins currently use a bad value in ncurses-rs - 330 => Key::Del, - 331 => Key::Ins, // Those keys don't seem to be documented... 515 => Key::CtrlDel, 521 => Key::CtrlDown, @@ -89,6 +86,8 @@ impl Key { 556 => Key::CtrlRight, 557 => Key::CtrlShiftRight, 562 => Key::CtrlUp, + ncurses::KEY_DC => Key::Del, + ncurses::KEY_IC => Key::Ins, ncurses::KEY_BTAB => Key::ShiftTab, ncurses::KEY_SLEFT => Key::ShiftLeft, ncurses::KEY_SRIGHT => Key::ShiftRight,