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

RE: Mapping numeric keypad [PATCH]

Expand Messages
  • Vince Negri
    This patch adds support for mapping the numeric keypad 0-9 separately from normal 0-9. It defines new termcap keys K_K0 to K_K9, and the
    Message 1 of 4 , May 11, 2000
    • 0 Attachment
      <<keypad.diff.gz>>

      This patch adds support for mapping the numeric keypad 0-9
      separately from normal 0-9. It defines new termcap keys
      K_K0 to K_K9, and the werewithal to generate these codes
      for the Win32 GUI and Win32 console versions. Other OSes
      will need the appropriate additions to their os-specific
      files.

      The new keys are 'named' <k0> to <k9>, c.f. <kPlus> etc.
      If unmapped they behave as normal number keys.

      One quick idea for mappings:
      :map <k2> gj
      :map <k4> h
      :map <k6> l
      :map <k8> gk

      ..to have a second set of 'screen lines' cursor keys...

      --
      Vince Negri (vnegri@...)
      Application Solutions Ltd. Tel:+44(0)1273-476608 Fax:+44(0)1273-478888

      Legal Disclaimer: Any views expressed by the sender of this message are
      not necessarily those of Application Solutions Ltd. Information in this
      e-mail may be confidential and is for the use of the intended recipient
      only, no mistake in transmission is intended to waive or compromise such
      privilege. Please advise the sender if you receive this e-mail by mistake.
    • Bram Moolenaar
      ... Looks OK. Where did you get the idea of using t_KB to t_KK? My terminfo doesn t define these. Is there really no keyboard with F13 to F20 for Win32? It
      Message 2 of 4 , May 11, 2000
      • 0 Attachment
        Vince Negri wrote:

        > This patch adds support for mapping the numeric keypad 0-9
        > separately from normal 0-9. It defines new termcap keys
        > K_K0 to K_K9, and the werewithal to generate these codes
        > for the Win32 GUI and Win32 console versions. Other OSes
        > will need the appropriate additions to their os-specific
        > files.

        Looks OK. Where did you get the idea of using t_KB to t_KK? My terminfo
        doesn't define these.

        Is there really no keyboard with F13 to F20 for Win32?

        It should be possible to make these keys work for X11 and GTK. Can anyone
        make a patch for this?

        --
        "My particular problem is with registry entries, which seem to just accumulate
        like plastic coffee cups..." -- Paul Moore

        /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
        \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
      • Vince Negri
        ... I just picked the next batch of keys after the keypad plus etc. I ve never seen a termcap which treats the numeric digits separately. ... If there is, I ve
        Message 3 of 4 , May 12, 2000
        • 0 Attachment
          Bram Moolenaar wrote:
          >
          > Vince Negri wrote:
          >
          > > This patch adds support for mapping the numeric keypad 0-9
          > > separately from normal 0-9. It defines new termcap keys
          > > K_K0 to K_K9, and the werewithal to generate these codes
          > > for the Win32 GUI and Win32 console versions. Other OSes
          > > will need the appropriate additions to their os-specific
          > > files.
          >
          > Looks OK. Where did you get the idea of using t_KB to t_KK? My terminfo
          > doesn't define these.
          I just picked the next batch of keys after the keypad plus etc. I've
          never seen a termcap which treats the numeric digits separately.


          > Is there really no keyboard with F13 to F20 for Win32?
          If there is, I've never seen it (note the 'what the hell' in the old
          comment.) More to the point, there aren't enough special keycodes to
          accomodate F13 to F20 _and_ the keypad with all modifiers - this is
          also why numeric 9 doesn't get a full set of modifiers. You could
          share things out differently I suppose, by only allowing shift as a
          modifier with both numeric keys and F13-F20. But since no-one has F13
          and almost everyone has numeric keys, it seemed the most sensible
          arrangement.


          --
          Vince Negri (vnegri@...)
          Application Solutions Ltd. Tel:+44(0)1273-476608 Fax:+44(0)1273-478888
          Legal Disclaimer: Any views expressed by the sender of this message are
          not necessarily those of Application Solutions Ltd. Information in this
          e-mail may be confidential and is for the use of the intended recipient
          only, no mistake in transmission is intended to waive or compromise such
          privilege. Please advise the sender if you receive this e-mail by mistake.
        • Bram Moolenaar
          ... I also don t see one. My terminfo stops at K5. I forgot where K6 - KA came from... ... I see, we run out of space. It might be better to drop the
          Message 4 of 4 , May 12, 2000
          • 0 Attachment
            Vince Negri wrote:

            > > Looks OK. Where did you get the idea of using t_KB to t_KK? My terminfo
            > > doesn't define these.
            > I just picked the next batch of keys after the keypad plus etc. I've
            > never seen a termcap which treats the numeric digits separately.

            I also don't see one. My terminfo stops at K5. I forgot where K6 - KA came
            from...

            > > Is there really no keyboard with F13 to F20 for Win32?
            > If there is, I've never seen it (note the 'what the hell' in the old
            > comment.) More to the point, there aren't enough special keycodes to
            > accomodate F13 to F20 _and_ the keypad with all modifiers - this is
            > also why numeric 9 doesn't get a full set of modifiers. You could
            > share things out differently I suppose, by only allowing shift as a
            > modifier with both numeric keys and F13-F20. But since no-one has F13
            > and almost everyone has numeric keys, it seemed the most sensible
            > arrangement.

            I see, we run out of space. It might be better to drop the current coding,
            it's made up especially for Vim anyway. Perhaps we can move the "invented"
            termcap maps together into one "vim" terminal. We could use the GUI one for a
            start. Should be able to fit UTF-8 in there as well. Ah, more work on the
            todo list...

            --
            FATHER: Make sure the Prince doesn't leave this room until I come and
            get him.
            FIRST GUARD: Not ... to leave the room ... even if you come and get him.
            FATHER: No. Until I come and get him.
            SECOND GUARD: Hic.
            "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

            /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
            \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
          Your message has been successfully submitted and would be delivered to recipients shortly.