Efficient key bindings using both Mac and Linux












11















I'm still switching back and forth all the time from linux to mac, and I can't figure out how to stop getting confused in my keystrokes, especially with browsers, and unix apps.



Here's the situation:
* Emacs, vim, shell, and other unix apps use the ctrl key the same on both mac and linux
* Some VERY common keystrokes of copy, paste, cut, all are swapped cmd on the mac, and ctrl on linux.



Some things I tried:
* Using cmd as ctrl in emacs -- kind of works, but then it confuses other unix type apps
* Swapping the position of cmd and ctrl on the keyboard -- good for copy, paste, all, and not much else.



I can't possibly be the only one that goes back and forth between mac and linux having this issue.



Would it possibly be better to approach this from the Linux side and change the mappings there so that I can have the same ones on the Mac?



The main problem is browser apps (Chrome/Firefox) and then unix type apps (Emacs, IntelliJ, Rubymine, Vim, tmux).










share|improve this question





























    11















    I'm still switching back and forth all the time from linux to mac, and I can't figure out how to stop getting confused in my keystrokes, especially with browsers, and unix apps.



    Here's the situation:
    * Emacs, vim, shell, and other unix apps use the ctrl key the same on both mac and linux
    * Some VERY common keystrokes of copy, paste, cut, all are swapped cmd on the mac, and ctrl on linux.



    Some things I tried:
    * Using cmd as ctrl in emacs -- kind of works, but then it confuses other unix type apps
    * Swapping the position of cmd and ctrl on the keyboard -- good for copy, paste, all, and not much else.



    I can't possibly be the only one that goes back and forth between mac and linux having this issue.



    Would it possibly be better to approach this from the Linux side and change the mappings there so that I can have the same ones on the Mac?



    The main problem is browser apps (Chrome/Firefox) and then unix type apps (Emacs, IntelliJ, Rubymine, Vim, tmux).










    share|improve this question



























      11












      11








      11


      5






      I'm still switching back and forth all the time from linux to mac, and I can't figure out how to stop getting confused in my keystrokes, especially with browsers, and unix apps.



      Here's the situation:
      * Emacs, vim, shell, and other unix apps use the ctrl key the same on both mac and linux
      * Some VERY common keystrokes of copy, paste, cut, all are swapped cmd on the mac, and ctrl on linux.



      Some things I tried:
      * Using cmd as ctrl in emacs -- kind of works, but then it confuses other unix type apps
      * Swapping the position of cmd and ctrl on the keyboard -- good for copy, paste, all, and not much else.



      I can't possibly be the only one that goes back and forth between mac and linux having this issue.



      Would it possibly be better to approach this from the Linux side and change the mappings there so that I can have the same ones on the Mac?



      The main problem is browser apps (Chrome/Firefox) and then unix type apps (Emacs, IntelliJ, Rubymine, Vim, tmux).










      share|improve this question
















      I'm still switching back and forth all the time from linux to mac, and I can't figure out how to stop getting confused in my keystrokes, especially with browsers, and unix apps.



      Here's the situation:
      * Emacs, vim, shell, and other unix apps use the ctrl key the same on both mac and linux
      * Some VERY common keystrokes of copy, paste, cut, all are swapped cmd on the mac, and ctrl on linux.



      Some things I tried:
      * Using cmd as ctrl in emacs -- kind of works, but then it confuses other unix type apps
      * Swapping the position of cmd and ctrl on the keyboard -- good for copy, paste, all, and not much else.



      I can't possibly be the only one that goes back and forth between mac and linux having this issue.



      Would it possibly be better to approach this from the Linux side and change the mappings there so that I can have the same ones on the Mac?



      The main problem is browser apps (Chrome/Firefox) and then unix type apps (Emacs, IntelliJ, Rubymine, Vim, tmux).







      linux macos ubuntu






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 30 '12 at 21:32









      Jeremy W

      3,4511335




      3,4511335










      asked May 19 '12 at 23:07









      justingordonjustingordon

      578621




      578621






















          3 Answers
          3






          active

          oldest

          votes


















          2














          After a number of months, I did come to a solution that I like.




          • On the Mac, I got used to the fact that there are 3 main modifiers: Cmd, Ctrl, Opt.

          • On the Linux box, I use the same kinesis keyboard and have the same layout for the modifiers, such that I map:



          Mac => Linux
          CMD == Ctrl
          Opt == Alt
          Ctrl == Ctrl



          The key was to have ctrl twice. And then I got used to the differences between cmd and ctrl on the mac, and on the PC, it worked out that ctrl is the key. For example:



          In Chrome:



          Ctrl-tab on the Mac ==> Ctrl-tab on Linux
          Cmd-C on the Mac ==> Ctrl-c on Linux.


          So I can hit two different keys on Linux and get the same result as the Mac.



          If you have a windows type keyboard, you can remap something like the special windows key to be the mac command key.



          I've since switched to just using a Mac, and, without a doubt, that's way more efficient for touch typing!






          share|improve this answer





















          • 1





            Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

            – Pithikos
            Jul 22 '17 at 17:39













          • Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

            – Max Power
            Dec 6 '18 at 3:53



















          0














          KDE (Kubuntu) has a shortcut config tool that lets you set global shortcuts, but I couldn't get it to recognize the changes when I tested it. Perhaps it needs a restart. Maybe Ubuntu has a similar option.



          Another thing that might help with the copy and paste functions in Linux is to use the middle mouse button to paste. When you highlight some text, you don't have to copy it - highlight it, switch to your other app, then click the middle mouse button to paste the highlighted text. Different habits would make the keyboard issue a moot point, at least for those specific functions.






          share|improve this answer































            0














            I went through this a while ago and found someones autokey setup (I would give credit if I could find where it came from).



            I modified it for some things that were missing for my setup, but here it is:



            https://github.com/ericwooley/dotfiles/tree/master/.config/autokey



            It gets me to like 95% percent of all the keystrokes being the same.



            Some things that are still different cmd + right and cmd + left don't act the same, on Linux I use alt+page-up and down.



            I ended up depending on vim bindings in my editor to keep me sane, I would recommend that if it's possible for what you're doing.



            Oh, and guake has a configurable copy and paste setting for the terminal, so I set that to be alt+c and alt+p for terminal shenanigans






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f426515%2fefficient-key-bindings-using-both-mac-and-linux%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              After a number of months, I did come to a solution that I like.




              • On the Mac, I got used to the fact that there are 3 main modifiers: Cmd, Ctrl, Opt.

              • On the Linux box, I use the same kinesis keyboard and have the same layout for the modifiers, such that I map:



              Mac => Linux
              CMD == Ctrl
              Opt == Alt
              Ctrl == Ctrl



              The key was to have ctrl twice. And then I got used to the differences between cmd and ctrl on the mac, and on the PC, it worked out that ctrl is the key. For example:



              In Chrome:



              Ctrl-tab on the Mac ==> Ctrl-tab on Linux
              Cmd-C on the Mac ==> Ctrl-c on Linux.


              So I can hit two different keys on Linux and get the same result as the Mac.



              If you have a windows type keyboard, you can remap something like the special windows key to be the mac command key.



              I've since switched to just using a Mac, and, without a doubt, that's way more efficient for touch typing!






              share|improve this answer





















              • 1





                Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

                – Pithikos
                Jul 22 '17 at 17:39













              • Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

                – Max Power
                Dec 6 '18 at 3:53
















              2














              After a number of months, I did come to a solution that I like.




              • On the Mac, I got used to the fact that there are 3 main modifiers: Cmd, Ctrl, Opt.

              • On the Linux box, I use the same kinesis keyboard and have the same layout for the modifiers, such that I map:



              Mac => Linux
              CMD == Ctrl
              Opt == Alt
              Ctrl == Ctrl



              The key was to have ctrl twice. And then I got used to the differences between cmd and ctrl on the mac, and on the PC, it worked out that ctrl is the key. For example:



              In Chrome:



              Ctrl-tab on the Mac ==> Ctrl-tab on Linux
              Cmd-C on the Mac ==> Ctrl-c on Linux.


              So I can hit two different keys on Linux and get the same result as the Mac.



              If you have a windows type keyboard, you can remap something like the special windows key to be the mac command key.



              I've since switched to just using a Mac, and, without a doubt, that's way more efficient for touch typing!






              share|improve this answer





















              • 1





                Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

                – Pithikos
                Jul 22 '17 at 17:39













              • Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

                – Max Power
                Dec 6 '18 at 3:53














              2












              2








              2







              After a number of months, I did come to a solution that I like.




              • On the Mac, I got used to the fact that there are 3 main modifiers: Cmd, Ctrl, Opt.

              • On the Linux box, I use the same kinesis keyboard and have the same layout for the modifiers, such that I map:



              Mac => Linux
              CMD == Ctrl
              Opt == Alt
              Ctrl == Ctrl



              The key was to have ctrl twice. And then I got used to the differences between cmd and ctrl on the mac, and on the PC, it worked out that ctrl is the key. For example:



              In Chrome:



              Ctrl-tab on the Mac ==> Ctrl-tab on Linux
              Cmd-C on the Mac ==> Ctrl-c on Linux.


              So I can hit two different keys on Linux and get the same result as the Mac.



              If you have a windows type keyboard, you can remap something like the special windows key to be the mac command key.



              I've since switched to just using a Mac, and, without a doubt, that's way more efficient for touch typing!






              share|improve this answer















              After a number of months, I did come to a solution that I like.




              • On the Mac, I got used to the fact that there are 3 main modifiers: Cmd, Ctrl, Opt.

              • On the Linux box, I use the same kinesis keyboard and have the same layout for the modifiers, such that I map:



              Mac => Linux
              CMD == Ctrl
              Opt == Alt
              Ctrl == Ctrl



              The key was to have ctrl twice. And then I got used to the differences between cmd and ctrl on the mac, and on the PC, it worked out that ctrl is the key. For example:



              In Chrome:



              Ctrl-tab on the Mac ==> Ctrl-tab on Linux
              Cmd-C on the Mac ==> Ctrl-c on Linux.


              So I can hit two different keys on Linux and get the same result as the Mac.



              If you have a windows type keyboard, you can remap something like the special windows key to be the mac command key.



              I've since switched to just using a Mac, and, without a doubt, that's way more efficient for touch typing!







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jul 15 '17 at 22:50









              yass

              2,4153618




              2,4153618










              answered Jan 23 '13 at 6:03









              justingordonjustingordon

              578621




              578621








              • 1





                Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

                – Pithikos
                Jul 22 '17 at 17:39













              • Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

                – Max Power
                Dec 6 '18 at 3:53














              • 1





                Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

                – Pithikos
                Jul 22 '17 at 17:39













              • Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

                – Max Power
                Dec 6 '18 at 3:53








              1




              1





              Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

              – Pithikos
              Jul 22 '17 at 17:39







              Good trick but it forces you to make Ubuntu act like Mac and not the opposite. Also this approach won't work with Gnome3 since CMD is used for the overview of windows and search (mission control + Alfred equivalents). What is "touch typing" btw?

              – Pithikos
              Jul 22 '17 at 17:39















              Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

              – Max Power
              Dec 6 '18 at 3:53





              Pithikos do you have another keyboard configuration you prefer then for using a common keyboard on both ubuntu and mac, but to make the mac feel more like ubuntu?

              – Max Power
              Dec 6 '18 at 3:53













              0














              KDE (Kubuntu) has a shortcut config tool that lets you set global shortcuts, but I couldn't get it to recognize the changes when I tested it. Perhaps it needs a restart. Maybe Ubuntu has a similar option.



              Another thing that might help with the copy and paste functions in Linux is to use the middle mouse button to paste. When you highlight some text, you don't have to copy it - highlight it, switch to your other app, then click the middle mouse button to paste the highlighted text. Different habits would make the keyboard issue a moot point, at least for those specific functions.






              share|improve this answer




























                0














                KDE (Kubuntu) has a shortcut config tool that lets you set global shortcuts, but I couldn't get it to recognize the changes when I tested it. Perhaps it needs a restart. Maybe Ubuntu has a similar option.



                Another thing that might help with the copy and paste functions in Linux is to use the middle mouse button to paste. When you highlight some text, you don't have to copy it - highlight it, switch to your other app, then click the middle mouse button to paste the highlighted text. Different habits would make the keyboard issue a moot point, at least for those specific functions.






                share|improve this answer


























                  0












                  0








                  0







                  KDE (Kubuntu) has a shortcut config tool that lets you set global shortcuts, but I couldn't get it to recognize the changes when I tested it. Perhaps it needs a restart. Maybe Ubuntu has a similar option.



                  Another thing that might help with the copy and paste functions in Linux is to use the middle mouse button to paste. When you highlight some text, you don't have to copy it - highlight it, switch to your other app, then click the middle mouse button to paste the highlighted text. Different habits would make the keyboard issue a moot point, at least for those specific functions.






                  share|improve this answer













                  KDE (Kubuntu) has a shortcut config tool that lets you set global shortcuts, but I couldn't get it to recognize the changes when I tested it. Perhaps it needs a restart. Maybe Ubuntu has a similar option.



                  Another thing that might help with the copy and paste functions in Linux is to use the middle mouse button to paste. When you highlight some text, you don't have to copy it - highlight it, switch to your other app, then click the middle mouse button to paste the highlighted text. Different habits would make the keyboard issue a moot point, at least for those specific functions.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 20 '12 at 2:56









                  TomTom

                  1,28378




                  1,28378























                      0














                      I went through this a while ago and found someones autokey setup (I would give credit if I could find where it came from).



                      I modified it for some things that were missing for my setup, but here it is:



                      https://github.com/ericwooley/dotfiles/tree/master/.config/autokey



                      It gets me to like 95% percent of all the keystrokes being the same.



                      Some things that are still different cmd + right and cmd + left don't act the same, on Linux I use alt+page-up and down.



                      I ended up depending on vim bindings in my editor to keep me sane, I would recommend that if it's possible for what you're doing.



                      Oh, and guake has a configurable copy and paste setting for the terminal, so I set that to be alt+c and alt+p for terminal shenanigans






                      share|improve this answer




























                        0














                        I went through this a while ago and found someones autokey setup (I would give credit if I could find where it came from).



                        I modified it for some things that were missing for my setup, but here it is:



                        https://github.com/ericwooley/dotfiles/tree/master/.config/autokey



                        It gets me to like 95% percent of all the keystrokes being the same.



                        Some things that are still different cmd + right and cmd + left don't act the same, on Linux I use alt+page-up and down.



                        I ended up depending on vim bindings in my editor to keep me sane, I would recommend that if it's possible for what you're doing.



                        Oh, and guake has a configurable copy and paste setting for the terminal, so I set that to be alt+c and alt+p for terminal shenanigans






                        share|improve this answer


























                          0












                          0








                          0







                          I went through this a while ago and found someones autokey setup (I would give credit if I could find where it came from).



                          I modified it for some things that were missing for my setup, but here it is:



                          https://github.com/ericwooley/dotfiles/tree/master/.config/autokey



                          It gets me to like 95% percent of all the keystrokes being the same.



                          Some things that are still different cmd + right and cmd + left don't act the same, on Linux I use alt+page-up and down.



                          I ended up depending on vim bindings in my editor to keep me sane, I would recommend that if it's possible for what you're doing.



                          Oh, and guake has a configurable copy and paste setting for the terminal, so I set that to be alt+c and alt+p for terminal shenanigans






                          share|improve this answer













                          I went through this a while ago and found someones autokey setup (I would give credit if I could find where it came from).



                          I modified it for some things that were missing for my setup, but here it is:



                          https://github.com/ericwooley/dotfiles/tree/master/.config/autokey



                          It gets me to like 95% percent of all the keystrokes being the same.



                          Some things that are still different cmd + right and cmd + left don't act the same, on Linux I use alt+page-up and down.



                          I ended up depending on vim bindings in my editor to keep me sane, I would recommend that if it's possible for what you're doing.



                          Oh, and guake has a configurable copy and paste setting for the terminal, so I set that to be alt+c and alt+p for terminal shenanigans







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 10 at 17:43









                          Eric WooleyEric Wooley

                          1112




                          1112






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f426515%2fefficient-key-bindings-using-both-mac-and-linux%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                              Alcedinidae

                              Can an atomic nucleus contain both particles and antiparticles? [duplicate]