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

Incorrect EBCDIC keyboard behavior

Expand Messages
  • Anthony Giorgio
    I ve been a user of Vim for a while now, and it has become my favorite editor. Like all programs, vim is not perfect. One of my chief complaints about vim is
    Message 1 of 2 , Apr 1, 2003
      I've been a user of Vim for a while now, and it has become my favorite
      editor. Like all programs, vim is not perfect. One of my chief complaints
      about vim is that some keys do not work on an EBCEDIC system.
      Specifically, the Home, End, Page Up, and Page Down keys have incorrect
      behaviors. These problems only occur in console mode (gvim is unaffected,
      and the keys work properly).

      I believe vim is not handling the correct sequence of escape characters the
      terminal is generating, and there may still be extra characters in the
      buffer.

      Here is the sequence of binary EBCDIC characters that my terminal (and a
      co-worker's) generate on our IBM z/900 mainframe. Home and end generate
      different characters from our terminals.

      /* Home2 - 39 (Esc), 173 ([), 200 (H) */
      /* End2 - 39 (Esc), 173 ([), 198 (F) */
      /* Home - 39 (Esc), 173 ([), 241 (1), 161(~) */
      /* Insert - 39 (Esc), 173 ([), 242 (2), 161(~) */
      /* Delete - 39 (Esc), 173 ([), 243 (3), 161(~) */
      /* End - 39 (Esc), 173 ([), 244 (4), 161(~) */
      /* Page Up - 39 (Esc), 173 ([), 245 (5), 161(~) */
      /* Page Down - 39 (Esc), 173 ([) ,246 (6), 161(~) */

      Where would I look in the code to investigate this bug? I've compiled vim
      6.1.405 and the erroneous behavior is still present. The delete key works
      normally now, but it is broken in our 6.1.100 build.


      Anthony Giorgio
      Software Engineer
      dbx Developer

      "Thou shalt not follow the Null Pointer, for at its end Chaos and Madness
      lie."
    • Charles E. Campbell
      ... This problem is not a Vim problem, Vim is a victim -- of an incorrect terminal description. Normally that s a termcap or terminfo issue. If you can t fix
      Message 2 of 2 , Apr 2, 2003
        On Tue, Apr 01, 2003 at 05:05:51PM -0500, Anthony Giorgio wrote:
        > I believe vim is not handling the correct sequence of escape characters the
        > terminal is generating, and there may still be extra characters in the
        > buffer.
        >
        > Here is the sequence of binary EBCDIC characters that my terminal (and a
        > co-worker's) generate on our IBM z/900 mainframe...
        >
        > Home and end generate different characters from our terminals.
        >
        > /* Home2 - 39 (Esc), 173 ([), 200 (H) */
        > ...
        ---------------------------------------------------------------------

        This problem is not a Vim problem, Vim is a victim -- of an incorrect
        terminal description. Normally that's a termcap or terminfo issue.

        If you can't fix the termcap/terminfo entry for your terminal, try using
        maps to fix things. For an example, consider using

        map <Esc>[H <Home>

        That way the escape sequence that your <Home> key generates will be
        mapped to whatever Vim (ie. your termcap/terminfo) thinks it should be.

        Regards,
        C Campbell

        --
        Charles E Campbell, Jr, PhD _ __ __
        Goddard Space Flight Center / /_/\_\_/ /
        cec@... /_/ \/_//_/
        PGP public key: http://www.erols.com/astronaut/pgp.html
      Your message has been successfully submitted and would be delivered to recipients shortly.