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

Re: Switching Control and Command

Expand Messages
  • Dmitry Kichenko
    Thanks for the response. I already remapped the Caps Lock to Ctrl via the System Preferences but the problem is a lot of functionality in Mac OS is based
    Message 1 of 11 , Aug 8, 2009
    • 0 Attachment
      Thanks for the response.

      I already remapped the Caps Lock to Ctrl via the System Preferences
      but the problem is a lot of functionality in Mac OS is based around
      the Command key.

      Basically, that allows for easier use of VIm but things like copying,
      pasting and all the other commands in Mac OS still require bending the
      finger to reach for the Command key, whereas in Windows most OS
      commands revolve around Ctrl which means I can use the little finger
      for everything.

      Once I get home however, my little finger keeps reaching for Caps Lock/
      Ctrl for all the system commands but that only has meaning within
      MacVim — Mac OS still wants me to use the Command key. The workaround,
      then, is to map Caps Lock to Command but of course I can no longer use
      Vim in that case without some sort of additional remapping.

      I've tried DoubleCommand which doesn't really do anything beyond what
      the System Preferences offer in this given case so I think what I
      really need is some sort of per-application overriding.

      I'll check out the solutions you've suggested above. Thanks!

      On Aug 8, 1:44 pm, björn <bjorn.winck...@...> wrote:
      > 2009/8/7 Dmitry Kichenko:
      >
      >
      >
      >
      >
      > > Would it be possible to switch the Ctrl and Command keys in MacVim via
      > > other than manually rebinding every possible binding that involves
      > > Ctrl by hand? emacs allows for that via the mac-control-modifier and
      > > mac-command modifier commands. I realize there are Mac specific
      > > bindings that involve the Command key, and ideally I'd like to
      > > minimize those as well
      >
      > > WHY?
      > > At work I use Windows machines and have the Control key mapped to Caps
      > > Lock. As Windows generally utilizes the Control key about as much as
      > > Mac OS utilizes Command, I've got used to reaching for Caps Lock for
      > > all sorts of daily tasks.
      >
      > > Back home, I keep reaching with my little finger for Caps Lock as
      > > well. The natural thing would be to remap Caps Lock to Command via the
      > > System Preferences but of course that means that in the Terminal and
      > > in VIm/MacVim none of the bindings work.
      >
      > I must be a bit dense, but if you're used to remapping Caps Lock to
      > Ctrl in Windows then why not do the same on your Mac (via the System
      > Preferences)?  Are you saying that the for every Ctrl+key combination
      > on Windows there is an equivalent Cmd+key combination by default on
      > Mac OS X?
      >
      > What do you mean by "none of the bindings work"...sorry, I just don't
      > follow.  Can you give me some concrete examples?
      >
      > > I've found one possible solution, Menu Master from unsanity, which I'm
      > > yet to try out but other than that, are there any built-in means of
      > > achieving this?
      >
      > There are no ways to remap Ctrl to Cmd in MacVim, no.  But the System
      > Preferences lets you do this, so why not use that?  If you want to do
      > more customization than what the System Preferences allows there are
      > programs like "DoubleCommand" and "PCKeyboardHack/KeyRemap4MacBook"
      > etc.
      >
      > Björn
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... Ok, I understand what you are trying to do now. The only solution I can come up with requires a bit of set up, but you won t need to install anything. For
      Message 2 of 11 , Aug 8, 2009
      • 0 Attachment
        2009/8/9 Dmitry Kichenko:
        >
        > Thanks for the response.
        >
        > I already remapped the Caps Lock to Ctrl via the System Preferences
        > but the problem is a lot of functionality in Mac OS is based around
        > the Command key.
        >
        > Basically, that allows for easier use of VIm but things like copying,
        > pasting and all the other commands in Mac OS still require bending the
        > finger to reach for the Command key, whereas in Windows most OS
        > commands revolve around Ctrl which means I can use the little finger
        > for everything.
        >
        > Once I get home however, my little finger keeps reaching for Caps Lock/
        > Ctrl for all the system commands but that only has meaning within
        > MacVim — Mac OS still wants me to use the Command key. The workaround,
        > then, is to map Caps Lock to Command but of course I can no longer use
        > Vim in that case without some sort of additional remapping.

        Ok, I understand what you are trying to do now. The only solution I
        can come up with requires a bit of set up, but you won't need to
        install anything.

        For example, here is how to set up Ctrl-C to Copy in MacVim:

        1. Open up System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts
        2. Click the "+" button in the lower left
        3. Fill in the boxes as follows:
        Application: All Applications
        Menu Title: Copy
        Keyboard Shortcut: ^C

        (Hold down Ctrl and "C" simultaneously in the last step.) Now repeat
        steps 2 and 3 for each menu item that you want to rebind to use Ctrl.
        This will only work for shortcuts that appear as menu items, but most
        Cmd-key combinations do appear on menus. You can choose "MacVim"
        instead of "All Applications" if you only want the keys to change in
        MacVim, but from what I can tell you want to change it for all
        applications.

        Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Dmitry Kichenko
        Ah. I think that might be the way to go indeed. Thanks so much for the suggestion! ... --~--~---------~--~----~------------~-------~--~----~ You received this
        Message 3 of 11 , Aug 8, 2009
        • 0 Attachment
          Ah. I think that might be the way to go indeed. Thanks so much for the
          suggestion!

          On Aug 8, 7:00 pm, björn <bjorn.winck...@...> wrote:
          > 2009/8/9 Dmitry Kichenko:
          >
          >
          >
          >
          >
          >
          >
          > > Thanks for the response.
          >
          > > I already remapped the Caps Lock to Ctrl via the System Preferences
          > > but the problem is a lot of functionality in Mac OS is based around
          > > the Command key.
          >
          > > Basically, that allows for easier use of VIm but things like copying,
          > > pasting and all the other commands in Mac OS still require bending the
          > > finger to reach for the Command key, whereas in Windows most OS
          > > commands revolve around Ctrl which means I can use the little finger
          > > for everything.
          >
          > > Once I get home however, my little finger keeps reaching for Caps Lock/
          > > Ctrl for all the system commands but that only has meaning within
          > > MacVim — Mac OS still wants me to use the Command key. The workaround,
          > > then, is to map Caps Lock to Command but of course I can no longer use
          > > Vim in that case without some sort of additional remapping.
          >
          > Ok, I understand what you are trying to do now.  The only solution I
          > can come up with requires a bit of set up, but you won't need to
          > install anything.
          >
          > For example, here is how to set up Ctrl-C to Copy in MacVim:
          >
          > 1. Open up System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts
          > 2. Click the "+" button in the lower left
          > 3. Fill in the boxes as follows:
          >     Application: All Applications
          >     Menu Title: Copy
          >     Keyboard Shortcut: ^C
          >
          > (Hold down Ctrl and "C" simultaneously in the last step.)  Now repeat
          > steps 2 and 3 for each menu item that you want to rebind to use Ctrl.
          > This will only work for shortcuts that appear as menu items, but most
          > Cmd-key combinations do appear on menus.  You can choose "MacVim"
          > instead of "All Applications" if you only want the keys to change in
          > MacVim, but from what I can tell you want to change it for all
          > applications.
          >
          > Björn
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Dmitry Kichenko
          Hmm. Now that I think about it this is more of the opposite of what I m trying to do. Rather than assigning Control to Caps Lock and remapping applications to
          Message 4 of 11 , Aug 8, 2009
          • 0 Attachment
            Hmm. Now that I think about it this is more of the opposite of what
            I'm trying to do.

            Rather than assigning Control to Caps Lock and remapping applications
            to use Control instead of Command, I would like to have Caps Lock
            mapped to Command instead, and reteach Vim to use Command instead of
            Control in all of its commands (and I can map the Command key to be
            Meta as well). That way all the other applications I use will
            automatically benefit from the Command key being where Control is on
            Windows and hence erase the difference between Windows and Mac OS as
            far as the day to day tasks go.

            I apologize if I seem to complicate life too much but I just wish
            Apple didn't have to be different in every possible way and decided to
            use Control as the primary modifier key. Come one Apple, you've
            already ditched the one button mouse :).

            Thank you for all the help so far.

            On Aug 8, 7:49 pm, Dmitry Kichenko <dmitrykiche...@...> wrote:
            > Ah. I think that might be the way to go indeed. Thanks so much for the
            > suggestion!
            >
            > On Aug 8, 7:00 pm, björn <bjorn.winck...@...> wrote:
            >
            >
            >
            > > 2009/8/9 Dmitry Kichenko:
            >
            > > > Thanks for the response.
            >
            > > > I already remapped the Caps Lock to Ctrl via the System Preferences
            > > > but the problem is a lot of functionality in Mac OS is based around
            > > > the Command key.
            >
            > > > Basically, that allows for easier use of VIm but things like copying,
            > > > pasting and all the other commands in Mac OS still require bending the
            > > > finger to reach for the Command key, whereas in Windows most OS
            > > > commands revolve around Ctrl which means I can use the little finger
            > > > for everything.
            >
            > > > Once I get home however, my little finger keeps reaching for Caps Lock/
            > > > Ctrl for all the system commands but that only has meaning within
            > > > MacVim — Mac OS still wants me to use the Command key. The workaround,
            > > > then, is to map Caps Lock to Command but of course I can no longer use
            > > > Vim in that case without some sort of additional remapping.
            >
            > > Ok, I understand what you are trying to do now.  The only solution I
            > > can come up with requires a bit of set up, but you won't need to
            > > install anything.
            >
            > > For example, here is how to set up Ctrl-C to Copy in MacVim:
            >
            > > 1. Open up System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts
            > > 2. Click the "+" button in the lower left
            > > 3. Fill in the boxes as follows:
            > >     Application: All Applications
            > >     Menu Title: Copy
            > >     Keyboard Shortcut: ^C
            >
            > > (Hold down Ctrl and "C" simultaneously in the last step.)  Now repeat
            > > steps 2 and 3 for each menu item that you want to rebind to use Ctrl.
            > > This will only work for shortcuts that appear as menu items, but most
            > > Cmd-key combinations do appear on menus.  You can choose "MacVim"
            > > instead of "All Applications" if you only want the keys to change in
            > > MacVim, but from what I can tell you want to change it for all
            > > applications.
            >
            > > Björn
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Nico Weber
            Hi Dmitry, ... Just get used to it. It s not _that_ hard :-) Also, it has the advantage that the system shortcuts such as cmd-c, cmd-v do not overlap with vim
            Message 5 of 11 , Aug 8, 2009
            • 0 Attachment
              Hi Dmitry,

              On 08.08.2009, at 17:00, Dmitry Kichenko wrote:

              > I apologize if I seem to complicate life too much but I just wish
              > Apple didn't have to be different in every possible way and decided to
              > use Control as the primary modifier key. Come one Apple, you've
              > already ditched the one button mouse :).

              Just get used to it. It's not _that_ hard :-)

              Also, it has the advantage that the system shortcuts such as cmd-c,
              cmd-v do not overlap with vim shortcuts such as ctrl-c, ctrl-v. On
              Windows, you have to choose between windows and vim behavior for these
              shortcuts, on os x you can have both.

              Nico

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Dmitry Kichenko
              * sigh * I considered (and still am) the possibility of just dealing with it . I suppose I could do that but I just thought I d ask here as the issue of
              Message 6 of 11 , Aug 8, 2009
              • 0 Attachment
                * sigh *

                I considered (and still am) the possibility of "just dealing with it".
                I suppose I could do that but I just thought I'd ask here as the issue
                of coming home and hitting Caps Lock expecting Mac OS to react to a
                Command key type of behaviour.

                On Aug 8, 8:03 pm, Nico Weber <nicolaswe...@...> wrote:
                > Hi Dmitry,
                >
                > On 08.08.2009, at 17:00, Dmitry Kichenko wrote:
                >
                > > I apologize if I seem to complicate life too much but I just wish
                > > Apple didn't have to be different in every possible way and decided to
                > > use Control as the primary modifier key. Come one Apple, you've
                > > already ditched the one button mouse :).
                >
                > Just get used to it. It's not _that_ hard :-)
                >
                > Also, it has the advantage that the system shortcuts such as cmd-c,  
                > cmd-v do not overlap with vim shortcuts such as ctrl-c, ctrl-v. On  
                > Windows, you have to choose between windows and vim behavior for these  
                > shortcuts, on os x you can have both.
                >
                > Nico
                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Steven Michalske
                You might try and talk to the KeyRemap4MacBook folks they have modes that only work in specific applications. They might be able to help you, or you might
                Message 7 of 11 , Aug 9, 2009
                • 0 Attachment
                  You might try and talk to the KeyRemap4MacBook folks they have modes
                  that only work in specific applications. They might be able to help
                  you, or you might choose to add a feature.

                  Steve

                  On Sat, Aug 8, 2009 at 6:18 PM, Dmitry Kichenko<dmitrykichenko@...> wrote:
                  >
                  > * sigh *
                  >
                  > I considered (and still am) the possibility of "just dealing with it".
                  > I suppose I could do that but I just thought I'd ask here as the issue
                  > of coming home and hitting Caps Lock expecting Mac OS to react to a
                  > Command key type of behaviour.
                  >
                  > On Aug 8, 8:03 pm, Nico Weber <nicolaswe...@...> wrote:
                  >> Hi Dmitry,
                  >>
                  >> On 08.08.2009, at 17:00, Dmitry Kichenko wrote:
                  >>
                  >> > I apologize if I seem to complicate life too much but I just wish
                  >> > Apple didn't have to be different in every possible way and decided to
                  >> > use Control as the primary modifier key. Come one Apple, you've
                  >> > already ditched the one button mouse :).
                  >>
                  >> Just get used to it. It's not _that_ hard :-)
                  >>
                  >> Also, it has the advantage that the system shortcuts such as cmd-c,
                  >> cmd-v do not overlap with vim shortcuts such as ctrl-c, ctrl-v. On
                  >> Windows, you have to choose between windows and vim behavior for these
                  >> shortcuts, on os x you can have both.
                  >>
                  >> Nico
                  > >
                  >

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Dmitry Kichenko
                  Thanks for all the suggestions guys. I m just trying to help my fingers not get too confused over their memory, rather than be a princess :). ...
                  Message 8 of 11 , Aug 9, 2009
                  • 0 Attachment
                    Thanks for all the suggestions guys. I'm just trying to help my
                    fingers not get too confused over their memory, rather than be a
                    princess :).

                    On Aug 9, 3:28 am, Steven Michalske <smichal...@...> wrote:
                    > You might try and talk to the KeyRemap4MacBook folks  they have modes
                    > that only work in specific applications.  They might be able to help
                    > you, or you might choose to add a feature.
                    >
                    > Steve
                    >
                    >
                    >
                    > On Sat, Aug 8, 2009 at 6:18 PM, Dmitry Kichenko<dmitrykiche...@...> wrote:
                    >
                    > > * sigh *
                    >
                    > > I considered (and still am) the possibility of "just dealing with it".
                    > > I suppose I could do that but I just thought I'd ask here as the issue
                    > > of coming home and hitting Caps Lock expecting Mac OS to react to a
                    > > Command key type of behaviour.
                    >
                    > > On Aug 8, 8:03 pm, Nico Weber <nicolaswe...@...> wrote:
                    > >> Hi Dmitry,
                    >
                    > >> On 08.08.2009, at 17:00, Dmitry Kichenko wrote:
                    >
                    > >> > I apologize if I seem to complicate life too much but I just wish
                    > >> > Apple didn't have to be different in every possible way and decided to
                    > >> > use Control as the primary modifier key. Come one Apple, you've
                    > >> > already ditched the one button mouse :).
                    >
                    > >> Just get used to it. It's not _that_ hard :-)
                    >
                    > >> Also, it has the advantage that the system shortcuts such as cmd-c,
                    > >> cmd-v do not overlap with vim shortcuts such as ctrl-c, ctrl-v. On
                    > >> Windows, you have to choose between windows and vim behavior for these
                    > >> shortcuts, on os x you can have both.
                    >
                    > >> Nico
                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Dmitry Kichenko
                    ... Thanks for the suggestion! Looks like you were right, the application already had some app-specific functionality built in, including, conveniently, vi
                    Message 9 of 11 , Aug 9, 2009
                    • 0 Attachment
                      > You might try and talk to the KeyRemap4MacBook folks  they have modes
                      > that only work in specific applications.  They might be able to help
                      > you, or you might choose to add a feature.

                      Thanks for the suggestion! Looks like you were right, the application
                      already had some app-specific functionality built in, including,
                      conveniently, vi detection (which wasn't used for anything as far as I
                      can tell). I just added a new function and a preference in the XML
                      file and voila, I now I have Ctrl mapped to Command only in Vim!

                      I used the 5.1.0 source files. Here is a patch if anyone is interested
                      in doing the same:
                      http://dl.getdropbox.com/u/1122945/Software/KeyRemap4MacBook-5.1.0_Remap_CommandL2ControlL.patch

                      Instructions on compiling are on the KeyRemap4MacBook website:
                      http://www.pqrs.org/tekezo/macosx/keyremap4macbook/source.html#t1p1

                      Thanks again!
                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_mac" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    Your message has been successfully submitted and would be delivered to recipients shortly.