Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change shortcut keys for mac

    I assume most Stata users don't like mac, but I am stuck with one. I need to change the shortcut key for execute(do) from [Command+Shift+D] to [Command+D] to make it more similar to windows. Any advice would make my day!

  • #2
    Nothing like asking for help with using Stata for Mac by telling the Mac users of Stata that "most Stata users don't like" Mac but you are stuck with one. That really motivates those of us who might be able to help you.

    As a Mac (not mac) user who for a long time was stuck with Windows on my job, I'd advise you to adjust to having two different environments.

    Although it should be possible to use the Keyboard Preferences to reassign the shortcut for the Execute (do) menu item in Stata, in fact it appears that Stata reserves command+D for duplicating the line the cursor is currently on, in both the Do-file editor window and the Command window, so I think you're stuck with my advice in the previous paragraph.
    Last edited by William Lisowski; 07 May 2017, 09:02.

    Comment


    • #3
      Hahaha, Didn't mean to offend any of mac users here I was not here to argue the capabilities of mac at all. People come here to share their problems and get help from those of you who are caring. I also have some advice for you William, take it easy brother, some people have different ideas about mac!! You'd better say, I don't know!!!

      Comment


      • #4
        Let me restate my answer to your question, because you apparently think I don't know the answer to your question, despite my having given it in my post.

        In macOS the user can normally use the Keyboard Preferences pane within the System Preferences app to assign keyboard shortcuts to specific menu items in specific applications. So using that, I was able to assign command+D to the Execute (do) menu item in Stata. I then discovered that Stata for Mac cancels this shortcut because it has its own use for command+D and it does not allow the user to override it this way. So what you hoped for is apparently not possible.
        Last edited by William Lisowski; 07 May 2017, 13:09.

        Comment


        • #5
          Because I just struggled finding an answer to a similar question, I'm going to bring this thread back from the dead to provide a non-snarky response to the OP's perfectly reasonable request:

          In Mojave, I was able to re-assign the combination "cmd-Y", which is for some evil reason "delete line" by default in stata on macs (sorry "Macs" ), instead of "redo". As a windows user, I've lost so many lines of code to that default bind on my work mac.

          This suggests that stata has stopped preventing the overwriting of its defaults binds. I'm on StataSE 15.1, if it matters.

          Comment


          • #6
            You are the BEST Luke. you made my day!

            Comment


            • #7
              Originally posted by Luke Hinsenkamp View Post
              In Mojave, I was able to re-assign the combination "cmd-Y", which is for some evil reason "delete line" by default in stata on macs (sorry "Macs" ), instead of "redo". As a windows user, I've lost so many lines of code to that default bind on my work mac.

              This suggests that stata has stopped preventing the overwriting of its defaults binds. I'm on StataSE 15.1, if it matters.
              I am using Stata 15.1 on a mac, and I tried to reassign the "Execute (do)" shortcut but it did not work. The menu showed that the shortcut was reassigned as I wanted, but that shortcut did not work whereas the default command+shift+D shortcut still worked. I tried reassigning the "Delete line" shortcut as you said you were able to do and that did work.

              Any idea why I am not able to successfully reassign the "Execute (do)" shortcut? (As a note: I did make sure I chose a new shortcut that wasn't already in use.)

              Comment

              Working...
              X