summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/intro.txt8
-rw-r--r--src/calcurse.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/doc/intro.txt b/doc/intro.txt
index a841739..9b91c86 100644
--- a/doc/intro.txt
+++ b/doc/intro.txt
@@ -4,10 +4,10 @@ calcurse Online Help
Welcome to the calcurse online help. The online help system allows for easily
getting help on specific calcurse features.
-On the calcurse main screen, type `:help <feature>` (e.g. `:help add`) to get
-help on a specific feature. Type `:help` without any parameter to display this
-introduction or simply use the corresponding keyboard shortcut (`?` by
-default).
+On the calcurse main screen, type `:help <feature>` (e.g. `:help add`) or
+`:help <key>` (e.g. `:help ^A`) to get help on a specific feature or key
+binding. Type `:help` without any parameter to display this introduction or
+simply use the corresponding keyboard shortcut (`?` by default).
All help texts are displayed using an external pager. You need to exit the
pager in order to get back to calcurse (pressing `q` should almost always
diff --git a/src/calcurse.c b/src/calcurse.c
index c3a7ce8..9127c98 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -506,6 +506,14 @@ static inline void key_generic_cmd(void)
topic = "intro";
snprintf(path, BUFSIZ, DOCDIR "/%s.txt", topic);
+
+ if (!io_file_exist(path) && keys_str2int(topic) > 0 &&
+ keys_get_action(keys_str2int(topic)) > 0) {
+ enum key action = keys_get_action(keys_str2int(topic));
+ snprintf(path, BUFSIZ, DOCDIR "/%s.txt",
+ keys_get_label(action));
+ }
+
if (io_file_exist(path)) {
wins_launch_external(path, conf.pager);
} else {