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

567Mapping irregularities

Expand Messages
  • Mac Vim Support (Axel Kielhorn)
    Mar 27, 2002
    • 0 Attachment
      Hi Benji,

      I've spend some time watching what Vim really sees when a key is
      pressed. Now I understand why some combinations are not mappable,
      next step would be to do something against that.

      The function under investigation is gui_mac_doKeyEvent in os_mac.c

      Keys pressed Mac OS sends Vim sees
      key_char modifier
      A 97 0 a
      S-A 65 2 A
      C-A 1 4 C-A
      S-C-A 1 4+2 C-A
      M-A 140 8 å
      C-M-A 140 8+4 å
      S-M-A 129 8+2 Å
      C-S-M-A 129 8+4+2 Å

      D-A 97 128 D-A
      S-D-A 97 128+2 D-A
      D-C-A 1 128+4 D-C-A
      D-M-A 140 128+8 D-å
      D-M-S-A 129 128+8+2 D-Å
      C-D-M-S-A 129 128+8+4+2 D-Å

      Note:
      D = Command
      M = Option
      S = Shift
      C = Controll

      å = option a (depends on keyboard encoding)
      Å = shift option a (depends on keyboard encoding)

      As we see, the only modifier send to Vim is Command.
      Shift, option and control are only encoded in the key_char.

      Looking at the code that isn't surprising because it clears all
      modifiers before passing the key_char to Vim. This was changed by the
      raindog patch. I'll compare it with the old version and report back.

      Axel
    • Show all 3 messages in this topic