diff --git a/doc/pages/mapping.asciidoc b/doc/pages/mapping.asciidoc index 8e6699f7..295224c2 100644 --- a/doc/pages/mapping.asciidoc +++ b/doc/pages/mapping.asciidoc @@ -132,6 +132,9 @@ be used: **, **, **, **:: The usual cursor-movement keys. +**:: + The Insert key. + **, **, ...**:: Function keys. diff --git a/src/keys.cc b/src/keys.cc index edbd5e0c..927baed9 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -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", '-' }, diff --git a/src/keys.hh b/src/keys.hh index b0940bd6..74d1b545 100644 --- a/src/keys.hh +++ b/src/keys.hh @@ -50,6 +50,7 @@ struct Key PageDown, Home, End, + Insert, Tab, F1, F2, diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index 32cfea57..5b6c4bad 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -606,6 +606,8 @@ Optional 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()); }