Eric Arnold wrote:

> How do I get the key name, i.e. <leftmouse> from the 3 byte keycode
> returned by getchar()?
> 
> strtrans() doesn't seem to deal with these.
> 
> ^Qkey  does this, but I was looking for a functional method.

In Insert and command-line mode using CTRL-K <hit-the-Key> mostly works.
You could make something that enters the key on the command line and
use getcmdline() to get the key name.

> Let me know if I've missed something, otherwise please consider the
> following patch to make   strtrans()  return <keyname>  strings in the
> place of 3 byte termcap key codes.

Why do you need a function to get the key name from a key code?  What
are you going to use that name for?  Why didn't you have the name
already?

-- 
Just remember...if the world didn't suck, we'd all fall off.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to