re-add u/d keybindings as aliases for Ctrl-u/d, matching more(1) and less(1) patch by Mikhail
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
diff --git a/tog/tog.1 b/tog/tog.1
index e8c907d..56d9224 100644
--- a/tog/tog.1
+++ b/tog/tog.1
@@ -108,9 +108,9 @@ Move the selection cursor up.
Move the selection cursor down one page.
.It Cm Page-up, Ctrl+b
Move the selection cursor up one page.
-.It Cm Ctrl+d
+.It Cm Ctrl+d, d
Move the selection cursor down one half page.
-.It Cm Ctrl+u
+.It Cm Ctrl+u, u
Move the selection cursor up one half page.
.It Cm Home, g
Move the cursor to the newest commit.
@@ -223,9 +223,9 @@ Scroll up.
Scroll down one page.
.It Cm Page-up, Ctrl+b
Scroll up one page.
-.It Cm Ctrl+d
+.It Cm Ctrl+d, d
Scroll down one half page.
-.It Cm Ctrl+u
+.It Cm Ctrl+u, u
Scroll up one half page.
.It Cm Home, g
Scroll to the top of the view.
@@ -294,9 +294,9 @@ Move the selection cursor up.
Move the selection cursor down one page.
.It Cm Page-up, Ctrl+b
Move the selection cursor up one page.
-.It Cm Ctrl+d
+.It Cm Ctrl+d, d
Move the selection cursor down one half page.
-.It Cm Ctrl+u
+.It Cm Ctrl+u, u
Move the selection cursor up one half page.
.It Cm Home, g
Move the selection cursor to the first line of the file.
@@ -377,9 +377,9 @@ Move the selection cursor up.
Move the selection cursor down one page.
.It Cm Page-up, Ctrl+b
Move the selection cursor up one page.
-.It Cm Ctrl+d
+.It Cm Ctrl+d, d
Move the selection cursor down one half page.
-.It Cm Ctrl+u
+.It Cm Ctrl+u, u
Move the selection cursor up one half page.
.It Cm Home, g
Move the selection cursor to the first entry.
@@ -451,9 +451,9 @@ Move the selection cursor up.
Move the selection cursor down one page.
.It Cm Page-up, Ctrl+b
Move the selection cursor up one page.
-.It Cm Ctrl+d
+.It Cm Ctrl+d, d
Move the selection cursor down one half page.
-.It Cm Ctrl+u
+.It Cm Ctrl+u, u
Move the selection cursor up one half page.
.It Cm Home, g
Move the selection cursor to the first reference.
diff --git a/tog/tog.c b/tog/tog.c
index 4f49803..d0d5836 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2480,6 +2480,7 @@ input_log_view(struct tog_view **new_view, struct tog_view *view, int ch)
select_commit(s);
break;
case CTRL('u'):
+ case 'u':
nscroll /= 2;
/* FALL THROUGH */
case KEY_PPAGE:
@@ -2532,6 +2533,7 @@ input_log_view(struct tog_view **new_view, struct tog_view *view, int ch)
break;
}
case CTRL('d'):
+ case 'd':
nscroll /= 2;
/* FALL THROUGH */
case KEY_NPAGE:
@@ -3792,6 +3794,7 @@ input_diff_view(struct tog_view **new_view, struct tog_view *view, int ch)
s->first_displayed_line--;
break;
case CTRL('u'):
+ case 'u':
nscroll /= 2;
/* FALL THROUGH */
case KEY_PPAGE:
@@ -3809,6 +3812,7 @@ input_diff_view(struct tog_view **new_view, struct tog_view *view, int ch)
s->first_displayed_line++;
break;
case CTRL('d'):
+ case 'd':
nscroll /= 2;
/* FALL THROUGH */
case KEY_NPAGE:
@@ -4672,6 +4676,7 @@ input_blame_view(struct tog_view **new_view, struct tog_view *view, int ch)
s->first_displayed_line--;
break;
case CTRL('u'):
+ case 'u':
nscroll /= 2;
/* FALL THROUGH */
case KEY_PPAGE:
@@ -4827,6 +4832,7 @@ input_blame_view(struct tog_view **new_view, struct tog_view *view, int ch)
break;
}
case CTRL('d'):
+ case 'd':
nscroll /= 2;
/* FALL THROUGH */
case KEY_NPAGE:
@@ -5612,6 +5618,7 @@ input_tree_view(struct tog_view **new_view, struct tog_view *view, int ch)
tree_scroll_up(s, 1);
break;
case CTRL('u'):
+ case 'u':
nscroll /= 2;
/* FALL THROUGH */
case KEY_PPAGE:
@@ -5640,6 +5647,7 @@ input_tree_view(struct tog_view **new_view, struct tog_view *view, int ch)
tree_scroll_down(s, 1);
break;
case CTRL('d'):
+ case 'd':
nscroll /= 2;
/* FALL THROUGH */
case KEY_NPAGE:
@@ -6432,6 +6440,7 @@ input_ref_view(struct tog_view **new_view, struct tog_view *view, int ch)
ref_scroll_up(s, 1);
break;
case CTRL('u'):
+ case 'u':
nscroll /= 2;
/* FALL THROUGH */
case KEY_PPAGE:
@@ -6453,6 +6462,7 @@ input_ref_view(struct tog_view **new_view, struct tog_view *view, int ch)
ref_scroll_down(s, 1);
break;
case CTRL('d'):
+ case 'd':
nscroll /= 2;
/* FALL THROUGH */
case KEY_NPAGE: