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

Re: in xterm

Expand Messages
  • Neil Bird
    Around about 30/04/2003 16:03, Vince Negri typed ... ... [is this really vim-dev?] There are a no. of things that could be happening, and a greater no. of ways
    Message 1 of 2 , May 1 3:03 AM
    • 0 Attachment
      Around about 30/04/2003 16:03, Vince Negri typed ...
      > :imap <kPlus> hello
      > .. but the keypad + continued to produce merely a "+" in
      > insert mode.

      [is this really vim-dev?]

      There are a no. of things that could be happening, and a greater no.
      of ways to fix 'em :-)

      Try <Ctrl-V><kPlus> in xterm at the prompt and see what you get.
      Also try it with num-lock set.

      I've heavily customised my XTerm defaults file to ensure I get
      different key-sequences for nearly every key with every modifier for
      this very purpose, so I've no idea what the defaults are!

      E.g., in your fav. xdefaults file (pref. $XAPPLRESDIR/XTerm), the
      following[snipped from mine - makes the KP keys work 'normally' with
      num-lock on, and vim-mapping-friendly without]. I'm not certain <kPlus>
      will work - depends what escape sequence vim thinks that is. You might
      be able to tweak the defs. below to match, or else just map
      <esc>whatever instead. The mappings below are what I figured were the
      correct ones by examining xterm source (!) & VT manuals.

      XTerm*VT100.Translations: #override \
      @Num_Lock<Key>KP_Add: string("+") \n\
      @Num_Lock<Key>KP_Subtract:string("-") \n\
      @Num_Lock<Key>KP_Decimal: string(".") \n\
      @Num_Lock<Key>KP_Divide: string("/") \n\
      @Num_Lock<Key>KP_Insert: string("0") \n\
      @Num_Lock<Key>KP_Enter: string(0x0a) \n\
      ! <Key>KP_Multiply: string(0x1b) string("Oj") \n\
      !s <Key>KP_Multiply: string(0x1b) string("O2j") \n\
      ! a <Key>KP_Multiply: string(0x1b) string("O3j") \n\
      !s a <Key>KP_Multiply: string(0x1b) string("O4j") \n\
      ! c <Key>KP_Multiply: string(0x1b) string("O5j") \n\
      !s c <Key>KP_Multiply: string(0x1b) string("O6j") \n\
      ! a c <Key>KP_Multiply: string(0x1b) string("O7j") \n\
      !s a c <Key>KP_Multiply: string(0x1b) string("O8j") \n\
      ! <Key>KP_Add: string(0x1b) string("Ok") \n\
      !s <Key>KP_Add: string(0x1b) string("O2k") \n\
      ! a <Key>KP_Add: string(0x1b) string("O3k") \n\
      !s a <Key>KP_Add: string(0x1b) string("O4k") \n\
      ! c <Key>KP_Add: string(0x1b) string("O5k") \n\
      !s c <Key>KP_Add: string(0x1b) string("O6k") \n\
      ! a c <Key>KP_Add: string(0x1b) string("O7k") \n\
      !s a c <Key>KP_Add: string(0x1b) string("O8k") \n\
      ! <Key>KP_Subtract: string(0x1b) string("Om") \n\
      !s <Key>KP_Subtract: string(0x1b) string("O2m") \n\
      ! a <Key>KP_Subtract: string(0x1b) string("O3m") \n\
      !s a <Key>KP_Subtract: string(0x1b) string("O4m") \n\
      ! c <Key>KP_Subtract: string(0x1b) string("O5m") \n\
      !s c <Key>KP_Subtract: string(0x1b) string("O6m") \n\
      ! a c <Key>KP_Subtract: string(0x1b) string("O7m") \n\
      !s a c <Key>KP_Subtract: string(0x1b) string("O8m") \n\
      ! <Key>KP_Decimal: string(0x1b) string("On") \n\
      !s <Key>KP_Decimal: string(0x1b) string("O2n") \n\
      ! a <Key>KP_Decimal: string(0x1b) string("O3n") \n\
      !s a <Key>KP_Decimal: string(0x1b) string("O4n") \n\
      ! c <Key>KP_Decimal: string(0x1b) string("O5n") \n\
      !s c <Key>KP_Decimal: string(0x1b) string("O6n") \n\
      ! a c <Key>KP_Decimal: string(0x1b) string("O7n") \n\
      !s a c <Key>KP_Decimal: string(0x1b) string("O8n") \n\
      ! <Key>KP_Divide: string(0x1b) string("Oo") \n\
      !s <Key>KP_Divide: string(0x1b) string("O2o") \n\
      ! a <Key>KP_Divide: string(0x1b) string("O3o") \n\
      !s a <Key>KP_Divide: string(0x1b) string("O4o") \n\
      ! c <Key>KP_Divide: string(0x1b) string("O5o") \n\
      !s c <Key>KP_Divide: string(0x1b) string("O6o") \n\
      ! a c <Key>KP_Divide: string(0x1b) string("O7o") \n\
      !s a c <Key>KP_Divide: string(0x1b) string("O8o") \n\
      ! <Key>KP_Insert: string(0x1b) string("Op") \n\
      !s <Key>KP_Insert: string(0x1b) string("O2p") \n\
      ! a <Key>KP_Insert: string(0x1b) string("O3p") \n\
      !s a <Key>KP_Insert: string(0x1b) string("O4p") \n\
      ! c <Key>KP_Insert: string(0x1b) string("O5p") \n\
      !s c <Key>KP_Insert: string(0x1b) string("O6p") \n\
      ! a c <Key>KP_Insert: string(0x1b) string("O7p") \n\
      !s a c <Key>KP_Insert: string(0x1b) string("O8p") \n\
      ! <Key>KP_Enter: string(0x1b) string("OM") \n\
      !s <Key>KP_Enter: string(0x1b) string("O2M") \n\
      ! a <Key>KP_Enter: string(0x1b) string("O3M") \n\
      !s a <Key>KP_Enter: string(0x1b) string("O4M") \n\
      ! c <Key>KP_Enter: string(0x1b) string("O5M") \n\
      !s c <Key>KP_Enter: string(0x1b) string("O6M") \n\
      ! a c <Key>KP_Enter: string(0x1b) string("O7M") \n\
      !s a c <Key>KP_Enter: string(0x1b) string("O8M")

      [neil@fnx ~]# rm -f .signature
      [neil@fnx ~]# ls -l .signature
      ls: .signature: No such file or directory
      [neil@fnx ~]# exit
    Your message has been successfully submitted and would be delivered to recipients shortly.