Fix Keyboard Input (Alpha version, use with caution!)

Description

This patch allows cli applications to use all the fancy key combinations that are available to gui applications. The new scheme for encoding key combinations was proposed by Leonard and appears to have gained traction over the past years.

Notes

{ XK_bracketleft, ControlMask, "\033[91;5u", 0, 0, 0},

{ XK_6, ControlMask, "\033[54;5u", 0, 0, 0},

nmap <C-CR> :echo "<C-CR>"<CR> nmap <C-S-CR> :echo "<C-S-CR>"<CR> nmap <C-S-M-CR> :echo "<C-S-M-CR>"<CR> nmap <S-M-CR> :echo "<S-M-CR>"<CR> nmap <M-CR> :echo "<M-CR>"<CR> nmap <C-M-CR> :echo "<C-M-CR>"<CR> nmap <C-Tab> :echo "<C-Tab>"<CR> nmap <C-S-Tab> :echo "<C-S-Tab>"<CR> nmap <S-Tab> :echo "<S-Tab>"<CR> nmap <M-Tab> :echo "<M-Tab>"<CR>

Here is an example. This entry

{ XK_underscore, ControlMask, "\033[95;5u", 0, 0, 0},

becomes the following:

{ XK_underscore, ControlMask, "\23395;5u", 0, 0, 0},

Download

Authors