Sunday, May 6, 2012

Getting with getchar() in script

I am using console Vim version 7.3 on Fedora Linux.

When I enter <S-Tab> while executing a script, the
getchar() function returns 0. (getchar() also returns
0 for <End>, <Home>, <PageDown> and <PageUp>).
Now, getchar() returns usable values for, of course,
<Tab> and <Esc> but also <Del> and <BS>.
Now, looking a the termcap
:set termcap
I find the following
t_kD <Del> ^[[3~
t_kb <BS> ^?
t_kB <S-Tab> ^[[Z
t_@7 <End> ^[[1;*F
t_kh <Home> ^[[1;*H
t_kN <PageDown> ^[[6;*~
t_kP <PageUp> ^[[5;*~

Also, on the command line when I enter <C-V><S-Tab> I get "^[[Z"

So, why does getchar() return 0 when I enter <S-Tab>
Thanks

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment