Skip to content
Snippets Groups Projects
Commit 0ffd795b authored by echicken's avatar echicken :chicken:
Browse files

q from help screen quits help, not the whole program.

o from help screen no longer causes go-for to shit its pants in
dramatic fashion.
s and w are now aliases for tab and ` respectively (item nav).
parent 17cf7265
No related branches found
No related tags found
No related merge requests found
...@@ -423,6 +423,7 @@ function main() { ...@@ -423,6 +423,7 @@ function main() {
state.input.key = state.input.key.toLowerCase(); state.input.key = state.input.key.toLowerCase();
switch (state.input.key) { switch (state.input.key) {
// Highlight next link // Highlight next link
case 's':
case '\t': case '\t':
if (state.item_type == '1' || state.item_type == '7') { if (state.item_type == '1' || state.item_type == '7') {
lowlight(state.doc[state.item], state.item); lowlight(state.doc[state.item], state.item);
...@@ -432,6 +433,7 @@ function main() { ...@@ -432,6 +433,7 @@ function main() {
} }
break; break;
// Highlight previous link // Highlight previous link
case 'w':
case '`': case '`':
if (state.item_type == '1' || state.item_type == '7') { if (state.item_type == '1' || state.item_type == '7') {
lowlight(state.doc[state.item], state.item); lowlight(state.doc[state.item], state.item);
...@@ -463,7 +465,11 @@ function main() { ...@@ -463,7 +465,11 @@ function main() {
break; break;
// Get root directory of current server // Get root directory of current server
case 'o': case 'o':
go_get(state.host, state.port, '', '1'); if (state.host === 'go-for') {
go_back();
} else {
go_get(state.host, state.port, '', '1');
}
break; break;
// Go back (history) // Go back (history)
case 'u': case 'u':
...@@ -506,6 +512,12 @@ function main() { ...@@ -506,6 +512,12 @@ function main() {
go_get(state.host, state.port, state.selector, state.item_type, true, false); go_get(state.host, state.port, state.selector, state.item_type, true, false);
} }
break; break;
case 'q':
if (state.host === 'go-for') {
state.input.key = '';
go_back();
}
break;
default: default:
actioned = false; actioned = false;
break; break;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
hc o w go to the root directory of the current server hc o w go to the root directory of the current server
hc u or [left] w go back hc u or [left] w go back
hc [right] w go forward hc [right] w go forward
hc [tab] w highlight the next item hc s or [tab] w highlight the next item
hc` (backtick) w highlight the previous item hc w or ` w highlight the previous item
hc [enter] w select the current item hc [enter] w select the current item
hc j or [up] w scroll up hc j or [up] w scroll up
hc k or [down] w scroll down hc k or [down] w scroll down
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment