forked from Archive/PX4-Autopilot
posix shell: handle Home & End (Editing keys)
See https://github.com/mintty/mintty/wiki/Keycodes#editing-keys
This commit is contained in:
parent
dfe1b59949
commit
86e2f9c306
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue