Loading ...
Sorry, an error occurred while loading the content.

some keypad key does not show correctly for Ctrl-V (possibly bug?)

Expand Messages
  • pansz
    When I started to use gvim for gtk2, I found the following: in :map we could press ctrl-v or ctrl-k for key code: group 1 press C-V kHome, vim shows
    Message 1 of 1 , Feb 4, 2009
    • 0 Attachment
      When I started to use gvim for gtk2, I found the following:
      in :map we could press ctrl-v or ctrl-k for key code:

      group 1
      press C-V kHome, vim shows <kHome>
      press C-V kEnd, vim shows <kEnd>
      press C-V kPgUp, vim shows <kPgUp>
      press C-V kPgDn, vim shows <kPgDn>
      press C-V kIns, vim shows <kInsert>
      press C-V kDel, vim shows <kDel>

      group 2
      press C-V kUp, vim shows <Up>
      press C-V kDown, vim shows <Down>
      press C-V kLeft, vim shows <Left>
      press C-V kRight,vim shows <Right>

      group 3
      press C-V kEnter,vim shows ^M, but we can only map it through <kEnter>
      press C-V kMinus,vim shows -, but we can only map it through <kMinus>
      press C-V kMulti,vim shows *, but we can only map it through <kMultiply>
      press C-V kPlus, vim shows +, but we can only map it through <kPlus>
      press C-V kDivid,vim shows /, but we can only map it through <kDivide>
      press C-V k1 to k9, vim shows 1 to 9, but we can only map it through
      <k1> to <k9>

      I think group 1 is the correct behavior, if user want to create a map,
      he can simply :map <C-V> then press the key to get the key code.

      For group 2, gvim/gtk2 treat <kUp> and <Up> the same, it is not ideal
      but it works.

      The group 3 confuses user a lot: :map <C-V> and press the key returns a
      key code, while the key code cannot be used to create a keypad mapping.
      Once a user knows that kEnter can be used to create the mapping he
      solves the problem, but before that the user would got seriously confused.

      Do you consider this to be a bug?

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.