diff options
author | James Booth <boothj5@gmail.com> | 2015-02-03 21:38:48 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-02-03 21:38:48 +0000 |
commit | 82ddbf332d65ce56f4152915060ff7241bfbe7b9 (patch) | |
tree | 128b43216ccdae35e2ab6ae235468bc69e8454f7 /src | |
parent | b76501f0bc908cbbb7850adf1e9e49eed95b0d31 (diff) | |
download | profani-tty-82ddbf332d65ce56f4152915060ff7241bfbe7b9.tar.gz |
Added OSX readline keyseq bindings
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/inputwin.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 9321706a..d0d0dfe6 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -276,14 +276,19 @@ startup_hook(void) rl_bind_keyseq("\\e[20~", win9_handler); rl_bind_keyseq("\\e[21~", win0_handler); +#ifdef PLATFORM_OSX + rl_bind_keyseq("\\e[1;9D", altleft_handler); + rl_bind_keyseq("\\e[1;9C", altright_handler); + rl_bind_keyseq("\\e\\e[5~", altpageup_handler); + rl_bind_keyseq("\\e\\e[6~", altpagedown_handler); +#else rl_bind_keyseq("\\e[1;3D", altleft_handler); rl_bind_keyseq("\\e[1;3C", altright_handler); - - rl_bind_keyseq("\\e[5~", pageup_handler); - rl_bind_keyseq("\\e[6~", pagedown_handler); - rl_bind_keyseq("\\e[5;3~", altpageup_handler); rl_bind_keyseq("\\e[6;3~", altpagedown_handler); +#endif + rl_bind_keyseq("\\e[5~", pageup_handler); + rl_bind_keyseq("\\e[6~", pagedown_handler); rl_bind_key('\t', tab_handler); |