Sunday, January 5, 2014

getchar() / nr2char() with non-default 'keymap'

Hi,

I am using getchar() in a plugin to get input from the user. But
getchar() returns the same keycode no matter what keymap is activated.
So for example:

:set keymap=bulgarian-phonetic

With this keymap, in insert-mode, typing "b" on a US keyboard inputs
"б". But typing "b" in the getchar() prompt always returns 98, and
nr2char(98) always returns "b" regardless of the keymap.

Is there some other function instead of nr2char() that gets the
keymapped character from a keycode?

Vim 7.4.35

Thanks!

Justin M. Keyes

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment