Skip to content
Snippets Groups Projects
Commit 86e2f9c3 authored by Beat Küng's avatar Beat Küng
Browse files

posix shell: handle Home & End (Editing keys)

parent dfe1b599
No related branches found
No related tags found
No related merge requests found
......@@ -593,10 +593,19 @@ int main(int argc, char **argv)
cursor_position = mystr.length();
break;
} else if (c == '1') { // Home (go to the beginning of the command, Editing key)
(void)getchar(); // swallow '~'
cursor_position = mystr.length();
break;
} else if (c == 'F') { // End (go to the end of the command)
cursor_position = 0;
break;
} else if (c == '4') { // End (go to the end of the command, Editing key)
(void)getchar(); // swallow '~'
cursor_position = 0;
break;
}
if (buf_ptr_read < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment