allow for mapping the Insert key

This commit is contained in:
Joachim Henke 2019-07-07 18:38:46 +02:00
parent 3a7d0b67fa
commit 556d58a073
4 changed files with 7 additions and 0 deletions

View File

@ -132,6 +132,9 @@ be used:
*<pageup>*, *<pagedown>*, *<home>*, *<end>*::
The usual cursor-movement keys.
*<ins>*::
The Insert key.
*<f1>*, *<f2>*, ...*<f12>*::
Function keys.

View File

@ -74,6 +74,7 @@ static constexpr KeyAndName keynamemap[] = {
{ "pagedown", Key::PageDown },
{ "home", Key::Home },
{ "end", Key::End },
{ "ins", Key::Insert },
{ "del", Key::Delete },
{ "plus", '+' },
{ "minus", '-' },

View File

@ -50,6 +50,7 @@ struct Key
PageDown,
Home,
End,
Insert,
Tab,
F1,
F2,

View File

@ -606,6 +606,8 @@ Optional<Key> NCursesUI::get_next_key()
case KEY_SHOME: return shift(Key::Home);
case KEY_END: return {Key::End};
case KEY_SEND: return shift(Key::End);
case KEY_IC: return {Key::Insert};
case KEY_SIC: return shift(Key::Insert);
case KEY_BTAB: return shift(Key::Tab);
case KEY_RESIZE: return resize(dimensions());
}