Steve S
Steve S

Reputation: 1053

RStudio for Mac: "Move Focus to Source" shortcut doesn't work (?)

The "Move Focus to Source" Shortcut (Ctrl1) doesn't seem to be working--either it does nothing or, when RStudio is in full-screen mode, it (annoyingly) acts as if I had just pressed Ctrl+Left Arrow) (However, manually clicking on "Move Focus to Source" does work as expected).

This post suggests that it might be a bug. However, in contrast to the post, the other shortcuts involving control+numeral (Such as "Show History") appear to be working correctly.

So is this a bug or am I doing something wrong?
Also, since--as mentioned in the post--the RStudio guys "don't recommend overriding [the keyboard shortcuts] via the Mac System Preferences", I'd prefer to avoid that approach (though I'm not exactly sure why it should be avoided--hopefully someone can shed some light on this, too).

Set-up:
OS X Version 10.9.3
RStudio Version 0.98.501

Upvotes: 2

Views: 756

Answers (3)

The Hung
The Hung

Reputation: 16

I wanted to add a comment to @Steve S answer since it help me resolve the same problem but the sites don't let me. So here's an update on macOS Ventura 13.1 (the OS has changed a little since the question was first asked)

To disable system shortcuts Ctrl+1

# on the top menu # click the apple icon # then follow
System Settings -> Keyboard -> Keyboard Shortcuts -> Mission Control
  -> expand "Mission Control" item -> Disable "Switch to Desktop 1"

Upvotes: 0

Steve S
Steve S

Reputation: 1053

By default, Apple sets the Ctrl1 shortcut to "Switch to Desktop 1". As a result, if you want to enable the Ctrl1 behavior in RStudio you will first have to disable this shortcut in the System Preferences.

Specifically, the path is:

System Preferences --> Keyboard --> Mission Control --> Switch to Desktop 1 

Then, after disabling this, RStudio's shortcut will work just fine.

[Note: you could either reassign the RStudio shortcut or the "Switch to Desktop 1" shortcut but the approach I described is definitely the most reliable since you won't have to worry about any other shortcut conflicts.]

Upvotes: 6

Nanitous
Nanitous

Reputation: 143

I encounter the same problem when I use the Romaji keyboard instead of the e.g. US or US Extended keyboards.

When one of the Japanese input methods is active, ^1 is used to "Convert to related character" and ^2 is used to find a similar kanji character.

In other words, when you use multiple input methods, use the correct input method for working with RStudio.

Upvotes: 4

Related Questions