Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ctrl + 1 / Ctrl + 2 to send focus to Console / Source? #268

Closed
kevinushey opened this issue Mar 10, 2023 · 7 comments
Closed

Use Ctrl + 1 / Ctrl + 2 to send focus to Console / Source? #268

kevinushey opened this issue Mar 10, 2023 · 7 comments
Labels
area: console Issues related to Console category.
Milestone

Comments

@kevinushey
Copy link
Contributor

This is a bit of muscle memory from RStudio that might be nice to have in Positron as well.

@petetronic petetronic added this to the Internal Preview milestone Apr 10, 2023
@seeM
Copy link
Contributor

seeM commented Aug 11, 2023

This feels like a quick win, and makes a big difference for my personal workflow. I don't think there's currently a way to switch focus between Source / Console via the keyboard.

@seeM
Copy link
Contributor

seeM commented Aug 11, 2023

It could be nice if this keyboard shortcut also focused the Console tab of the of the bottom "Panel" e.g. if the Terminal or Output tab is currently focused.

@jennybc
Copy link
Member

jennybc commented Sep 26, 2023

I am really missing this from RStudio. I achieve it differently (Ctrl + X, O) because I use the Emacs keybindings. But, yes, I too would dearly love to have a command for this.

@jmcphers
Copy link
Collaborator

jmcphers commented Nov 2, 2023

VS Code uses Ctrl + 1, Ctrl + 2, etc. to focus the first, second, etc. editor tab. So this is another case wherein we'd probably want the user to opt into RStudio keymaps (#669) before we took the bindings.

@juliasilge
Copy link
Contributor

In #2067 we added the RStudio keymap including:

  • Ctrl + 1 to focus Source
  • Ctrl + 2 to focus Console

@juliasilge
Copy link
Contributor

In Positron 2024.01.0 (Universal) build 176 I can switch focus between the source editor and console with Ctrl + 1 and Ctrl + 2:

ctrl-one-two.mov

@wesm wesm added the area: console Issues related to Console category. label Feb 29, 2024
@JohannesNE
Copy link

JohannesNE commented Jul 10, 2024

For me on Linux, ctrl+2 just opens a new panel (as in vscode).
The correct binding (focus console) seems to be present in the keyboard shortcuts.

EDIT: Sorry, just enabled Rstudio Keymap in settings. (rstudio.keymap.enable)
It works now. I'll leave this in case others has the same problem.

Positron Version: 2024.07.0 build 21
Code - OSS Version: 1.90.0
Commit: 82b335e
Date: 2024-07-09T03:06:22.884Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.2.6-76060206-generic

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: console Issues related to Console category.
Projects
None yet
Development

No branches or pull requests

8 participants