shell: add meta-keys

Added following meta-keys:
Ctrl-B - moves the cursor backward one character
Ctrl-D - deletes the character under the cursor
Ctrl-F - moves the cursor forward one character
Ctrl-K - deletes from the cursor to the end of the line
Alt-F  - moves the cursor forward one word
Alt-B  - moves the cursor backward one word

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2019-01-11 15:08:55 +01:00 committed by Anas Nashif
commit 63696968eb
4 changed files with 97 additions and 2 deletions

View file

@ -11,11 +11,17 @@
#define SHELL_VT100_ASCII_DEL (0x7F)
#define SHELL_VT100_ASCII_BSPACE (0x08)
#define SHELL_VT100_ASCII_CTRL_A (0x01)
#define SHELL_VT100_ASCII_CTRL_B (0x02)
#define SHELL_VT100_ASCII_CTRL_C (0x03)
#define SHELL_VT100_ASCII_CTRL_D (0x04)
#define SHELL_VT100_ASCII_CTRL_E (0x05)
#define SHELL_VT100_ASCII_CTRL_F (0x06)
#define SHELL_VT100_ASCII_CTRL_K (0x0B)
#define SHELL_VT100_ASCII_CTRL_L (0x0C)
#define SHELL_VT100_ASCII_CTRL_U (0x15)
#define SHELL_VT100_ASCII_CTRL_W (0x17)
#define SHELL_VT100_ASCII_ALT_B (0x62)
#define SHELL_VT100_ASCII_ALT_F (0x66)
#define SHELL_VT100_SETNL \
{ \