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

Re: [carbonized vim] accent marks, mapping keys

Expand Messages
  • Benji Fisher
    raindog@mediaone.net wrote: ^^^^^^^^^^^^ Is that about to change, or is %s/mediaone .net/attbi.com only appropriate for mediaone.net customers in my
    Message 1 of 6 , Feb 23, 2002
    • 0 Attachment
      raindog@... wrote:
      ^^^^^^^^^^^^
      Is that about to change, or is

      %s/mediaone\.net/attbi.com

      only appropriate for mediaone.net customers in my neighborhood?
      >
      [snip]
      > I made the following change to gui_mac.c, and shifted keys are now
      > mappable. This change doesn't appear to have broken anything else,
      > but it would be advisable for someone else to do more exhaustive
      > testing of it than I have.

      Thank you! It will be nice to have matchit.vim back again. ;)

      I'll try this the next time I compile a Carbon vim for OS X, but that
      might not be for a few days. I trust that Axel will try it out for Classic.
      It would be nice to get this done before vim 6.1 is released, but that might
      not happen.

      > My source tree appears to be out of sync with everyone else's,

      It should be easy to get back in sync. I have not double-checked, but I
      think that Patches 6.0.250 and 6.0.251 are the ones I have been using; Bram
      got them from my iDisk. The first is the last big patch that Dany gave us,
      and the second is your patch for accelerator keys in menus.

      > so I'll just give instructions, rather than a patch: near the end
      > of gui_mac_doKeyEvent(), I replaced
      >
      > /* Add the modifier to the input bu if needed */
      > /* Do not want SHIFT-A or CTRL-A with modifier */
      > if (!IS_SPECIAL(key_char))
      > {
      > if( modifiers & MOD_MASK_CTRL)
      > modifiers = modifiers & ~MOD_MASK_CTRL;
      > else
      > if( modifiers & MOD_MASK_ALT)
      > modifiers = modifiers & ~MOD_MASK_ALT;
      >
      > }
      > if( modifiers )
      > ...
      >
      > with
      >
      > /* Add the modifier to the input bu if needed */
      > /* Do not want SHIFT-A or CTRL-A with modifier */
      > if (!IS_SPECIAL(key_char))
      > {
      > if( modifiers & MOD_MASK_CTRL)
      > modifiers = modifiers & ~MOD_MASK_CTRL;
      > /* else */
      > if( modifiers & MOD_MASK_ALT)
      > modifiers = modifiers & ~MOD_MASK_ALT;
      > /* else */
      > if( modifiers & MOD_MASK_SHIFT)
      > modifiers = modifiers & ~MOD_MASK_SHIFT;
      > }
      > if( modifiers )
      > ...
      >
      > Regards,
      > RD

      That looks pretty simple!

      --Benji Fisher
    • Bram Moolenaar
      ... The end of my gui_mac_doKeyEvent() function looks very different: /* Special keys (and a few others) may have modifiers */ if (num == 3 || key_sym ==
      Message 2 of 6 , Feb 24, 2002
      • 0 Attachment
        Raindog wrote:

        > I made the following change to gui_mac.c, and shifted keys are now
        > mappable. This change doesn't appear to have broken anything else,
        > but it would be advisable for someone else to do more exhaustive
        > testing of it than I have.
        >
        > My source tree appears to be out of sync with everyone else's,
        > so I'll just give instructions, rather than a patch: near the end
        > of gui_mac_doKeyEvent(), I replaced

        The end of my gui_mac_doKeyEvent() function looks very different:

        /* Special keys (and a few others) may have modifiers */
        if (num == 3 || key_sym == vk_Space || key_sym == vk_Tab
        || key_sym == vk_Return || key_sym == vk_Esc
        #ifdef USE_CMD_KEY
        || ((theEvent->modifiers & cmdKey) != 0)
        #endif
        )
        {
        string2[0] = CSI;
        string2[1] = KS_MODIFIER;
        string2[2] = 0;
        if (theEvent->modifiers & shiftKey)
        string2[2] |= MOD_MASK_SHIFT;
        if (theEvent->modifiers & controlKey)
        string2[2] |= MOD_MASK_CTRL;
        if (theEvent->modifiers & optionKey)
        string2[2] |= MOD_MASK_ALT;
        #ifdef USE_CMD_KEY
        if (theEvent->modifiers & cmdKey)
        string2[2] |= MOD_MASK_CMD;
        #endif
        if (string2[2] != 0)
        add_to_input_buf(string2, 3);
        }

        if (num == 1 && string[0] == CSI)
        {
        /* Insert CSI as K_CSI. Not tested! */
        string[1] = KS_EXTRA;
        string[2] = (int)KE_CSI;
        num = 3;
        }

        add_to_input_buf(string, num);


        Did I miss a patch?

        --
        hundred-and-one symptoms of being an internet addict:
        20. When looking at a pageful of someone else's links, you notice all of them
        are already highlighted in purple.

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
        \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • raindog@mediaone.net
        ... No, it looks like I m the one who was missing a patch. Apologies for the confusion. However, yesterday I downloaded the tarball from
        Message 3 of 6 , Feb 25, 2002
        • 0 Attachment
          On Sunday, February 24, 2002, at 06:26 AM, Bram Moolenaar wrote:

          > Raindog wrote:
          >
          >> I made the following change to gui_mac.c, and shifted keys are now
          >> mappable. ... near the end of gui_mac_doKeyEvent(), I replaced
          >
          > The end of my gui_mac_doKeyEvent() function looks very different:
          > ...
          > Did I miss a patch?

          No, it looks like I'm the one who was missing a patch. Apologies
          for the confusion.

          However, yesterday I downloaded the tarball from
          <http://cvs.sourceforge.net/cvstarballs/vim-cvsroot.tar.gz>--which
          has your version of gui_mac_doKeyEvent()--and in that version, maps
          of shifted keys are working properly. I wonder if that's the case
          for anyone else.

          RD
        Your message has been successfully submitted and would be delivered to recipients shortly.