2

I'm using the Spyder IDE to do Python development on macOS. This IDE provides some keyboard shortcuts I'm used to from other platforms, especially

  • F9 for running a line or selection of lines of codes.
  • F5 for running an entire Python script.

Unfortunately they don't seem to work. I found a suggestion to reset the shortcuts within the application by going to Preferences -> keyboard shortcut and restore the defaults. That didn't work for me, so how can I make these shortcuts work?

5
  • I welcome your editing my question so it gets out of jail so to speak. I personally don't know what else I could add to render this question acceptable to the authorities. I am unclear who takes the discretion to close questions so readily, and not re-open them.
    – Sympa
    Apr 14, 2021 at 19:15
  • See apple.stackexchange.com/help/closed-questions for what it means if a question is on hold.
    – nohillside
    Apr 15, 2021 at 6:17
  • 1
    See edit. Also, as it works for me: Did you try to press "fn"-F5 on your keyboard? Or change the function key settings in System Preferences -> Keyboard?
    – nohillside
    Apr 15, 2021 at 8:20
  • I tried everything with System Preferences -> Keyboard... restoring defaults, customizing shortcuts. Nothing worked. However hitting the "fn" first did work just fine. That is a very nice work around. You could post that as an answer and I would gladly give you a positive check mark and a best answer.
    – Sympa
    Apr 15, 2021 at 17:35
  • Relevant: apple.stackexchange.com/q/18527/24324 Sep 13, 2021 at 9:02

1 Answer 1

1

nohillside gave me a good hint and deserves credit for this answer. On a Mac when using F functions shortcuts where two different items are on that key, you have to use the "fn" key first at the left-hand bottom of your Apple keyboard. If the the F function key has only one item, then you can use it directly without the "fn" in front.

Thus, on my own Apple keyboard (and I suspect yours is the same), you don't have to hit fn before F5 or F6. But, you have to use fn in front of all the others.

Attempting to resolve this issue through the Preference -> Keyboard path just did not work at all for me, no matter what I tried. And, I tried a lot of different things.

nohillside had uncovered another way to attempt to resolve this issue from a GitHub reference. It seemed incredibly complicated and very invasive suggesting you modify numerous of your Python packages. That seemed somewhat dangerous. And, I am just sticking to the fn solution when typing F9. That's easy enough, and not that tasking.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .