summaryrefslogtreecommitdiff
path: root/src/keys.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-12 23:12:51 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-13 00:12:32 +0200
commitcabc22e032b933a84335da9acbbf0721eed9c63f (patch)
tree3a4915b68672986d1a3fb1228d78e40cc80b103c /src/keys.c
parent42c486d30d8e6f82d27651e19029e332af86cba3 (diff)
downloadcalcurse-cabc22e032b933a84335da9acbbf0721eed9c63f.zip
Add key bindings to go to the previous/next month/year
In addition to generic key bindings for moving one day (week) forward/backward, define similar bindings for moving a month or a year. Of course, count prefixes are allowed here as well. Also add status bar hints and help texts. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/keys.c')
-rw-r--r--src/keys.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/keys.c b/src/keys.c
index 6e6b194..f670f9a 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -71,6 +71,10 @@ static struct keydef_s keydef[NBKEYS] = {
{"generic-next-day", "C-l"},
{"generic-prev-week", "C-k"},
{"generic-next-week", "C-j"},
+ {"generic-prev-month", "M"},
+ {"generic-next-month", "m"},
+ {"generic-prev-year", "Y"},
+ {"generic-next-year", "y"},
{"generic-scroll-down", "C-n"},
{"generic-scroll-up", "C-p"},
{"generic-goto-today", "C-g"},
@@ -466,6 +470,19 @@ void keys_popup_info(enum key key)
info[KEY_GENERIC_NEXT_WEEK] =
_
("Move to next week in calendar, whichever panel is currently selected.");
+ info[KEY_GENERIC_PREV_MONTH] =
+ _("Move to previous month in calendar, whichever panel is currently "
+ "selected");
+ info[KEY_GENERIC_NEXT_MONTH] =
+ _
+ ("Move to next month in calendar, whichever panel is currently "
+ "selected.");
+ info[KEY_GENERIC_PREV_YEAR] =
+ _("Move to previous year in calendar, whichever panel is currently "
+ "selected");
+ info[KEY_GENERIC_NEXT_YEAR] =
+ _
+ ("Move to next year in calendar, whichever panel is currently selected.");
info[KEY_GENERIC_SCROLL_DOWN] =
_
("Scroll window down (e.g. when displaying text inside a popup window).");