summaryrefslogtreecommitdiffstats
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-08-03 18:41:55 +0000
committerFrederic Culot <calcurse@culot.org>2008-08-03 18:41:55 +0000
commit03ce2c6ea9ef828e8134a5297cdef4148d1613fe (patch)
tree92a2370823cbef2645dc372b51bcbfc61fb65c88 /src/calcurse.c
parent748662568f6ed7e4b1501e8b8df96f844180d8f8 (diff)
downloadcalcurse-03ce2c6ea9ef828e8134a5297cdef4148d1613fe.tar.gz
calcurse-03ce2c6ea9ef828e8134a5297cdef4148d1613fe.zip
new keybindings added
Diffstat (limited to 'src/calcurse.c')
-rwxr-xr-xsrc/calcurse.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 8e64e90..cd9b31c 100755
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -1,4 +1,4 @@
-/* $calcurse: calcurse.c,v 1.63 2008/04/26 15:35:26 culot Exp $ */
+/* $calcurse: calcurse.c,v 1.64 2008/08/03 18:41:55 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -219,11 +219,15 @@ main (int argc, char **argv)
other_status_page (wins_slctd ());
break;
+ case CTRL ('G'):
case 'G':
case 'g': /* Goto function */
erase_status_bar ();
calendar_set_current_date ();
- calendar_change_day (conf.input_datefmt);
+ if (ch == CTRL ('G'))
+ calendar_goto_today ();
+ else
+ calendar_change_day (conf.input_datefmt);
do_storage = true;
day_changed = true;
break;
@@ -383,7 +387,7 @@ main (int argc, char **argv)
io_export_data (IO_EXPORT_INTERACTIVE, &conf);
break;
- case (261): /* right arrow */
+ case KEY_RIGHT:
case ('L'):
case ('l'):
case CTRL ('L'):
@@ -395,7 +399,7 @@ main (int argc, char **argv)
}
break;
- case (260): /* left arrow */
+ case KEY_LEFT:
case ('H'):
case ('h'):
case CTRL ('H'):
@@ -407,7 +411,7 @@ main (int argc, char **argv)
}
break;
- case (259): /* up arrow */
+ case KEY_UP:
case ('K'):
case ('k'):
case CTRL ('K'):
@@ -433,7 +437,7 @@ main (int argc, char **argv)
}
break;
- case (258): /* down arrow */
+ case KEY_DOWN:
case ('J'):
case ('j'):
case CTRL ('J'):
@@ -460,6 +464,24 @@ main (int argc, char **argv)
}
break;
+ case '0':
+ if (wins_slctd () == CAL)
+ {
+ do_storage = true;
+ day_changed = true;
+ calendar_move (WEEK_START);
+ }
+ break;
+
+ case '$':
+ if (wins_slctd () == CAL)
+ {
+ do_storage = true;
+ day_changed = true;
+ calendar_move (WEEK_END);
+ }
+ break;
+
case ('Q'): /* Quit calcurse :( */
case ('q'):
if (conf.auto_save)