summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2012-09-05 23:35:24 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2012-09-05 23:36:11 +0200
commitfe9bcfbeab641307d9ea58f9cc64c428d0e9986d (patch)
tree967cfdc32b99fc011de2e6a8680ddf749dd7ecf9
parent299e1f2e9cf7fdf8b3b3fe9464cdc1a0a39c84df (diff)
bindings: add support for parsing/displaying insert key
-rw-r--r--src/bindings.cpp2
-rw-r--r--src/help.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/bindings.cpp b/src/bindings.cpp
index 43b88254..51795fb4 100644
--- a/src/bindings.cpp
+++ b/src/bindings.cpp
@@ -51,6 +51,8 @@ Key stringToSpecialKey(const std::string &s)
result = Key(KEY_SPACE, Key::Standard);
else if (!s.compare("enter"))
result = Key(KEY_ENTER, Key::Standard);
+ else if (!s.compare("insert"))
+ result = Key(KEY_IC, Key::NCurses);
else if (!s.compare("delete"))
result = Key(KEY_DC, Key::NCurses);
else if (!s.compare("left"))
diff --git a/src/help.cpp b/src/help.cpp
index 8744696b..c1469c6e 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -51,6 +51,8 @@ std::string keyToString(const Key &key, bool *print_backspace)
result += "Space";
else if (key == Key(KEY_ENTER, Key::Standard))
result += "Enter";
+ else if (key == Key(KEY_IC, Key::NCurses))
+ result += "Insert";
else if (key == Key(KEY_DC, Key::NCurses))
result += "Delete";
else if (key == Key(KEY_RIGHT, Key::NCurses))
@@ -88,8 +90,6 @@ std::string keyToString(const Key &key, bool *print_backspace)
return result;
}
-
-
}
void Help::Init()