Closed EdenGoldfarb closed 1 week ago
We aren't able to reproduce this on our end in the R console, including on Windows. We do contribute the keybinding for the console specifically, with "when": "editorLangId == r"
:
Could you say in more detail what your setup is like and what steps you are taking?
Windows 11 pro 10.0.22631 Build 22631 I'm simply trying to insert a pipe "|>" using the key binding "ctrl+shift+m.". While I can insert it in the main editor (R, QMD), nothing happens when I try it in the CONSOLE.
I hope the snip below will help. what other details should I provide?
Wow, so strange! Can you try this for us:
This will bring print some output in the developer tools console that you can click to expand. It will show you all the context keys that are set, and we are particularly interested in finding what you have for positronConsoleFocused
. I have positronConsoleFocused: true
, which is what is expected here and what makes the command available:
Well, it is also set to "true" -
Can you successfully clear the console via Ctrl+L and/or paste into the console via Ctrl+V? Those are other keybindings that are set to apply only when PositronConsoleFocused
.
I'm wondering if someone else (eg an extension) is squatting on the keyboard shortcut.
Go to the command pallette and do Preferences: Open Keyboard Shortcuts.
Click on the little keyboard icon and then use the shortcut of interest (ctrl + shift + m, in your case, cmd + shift + m, in my case). What do you see? Here's what I see:
Can you successfully clear the console via Ctrl+L and/or paste into the console via Ctrl+V? Those are other keybindings that are set to apply only when
PositronConsoleFocused
.
Yes, clearing and pastid do work in console.
I'm wondering if someone else (eg an extension) is squatting on the keyboard shortcut.
Go to the command pallette and do Preferences: Open Keyboard Shortcuts.
Click on the little keyboard icon and then use the shortcut of interest (ctrl + shift + m, in your case, cmd + shift + m, in my case). What do you see? Here's what I see:
Seems ok,
Your screenshot shows that the keybinding for inserting the pipe operator in the Console is missing! From my screenshot, that's the one where the When clause starts like positronConsoleFocused && ...
. So that is the real problem. I can't immediately think of a reason that the other commands would successfully register, but this one would not 🤔
"View: Toggle Problems" is also missing, and that one is contributed by VS Code itself! 😱
@EdenGoldfarb have you done anything to remove keybindings, like this? Can you share what's in your settings.json
and especially keybindings.json
?
@juliasilge, I haven't done anything like that.
"View: Toggle Problems" is also missing, and that one is contributed by VS Code itself! 😱
@EdenGoldfarb have you done anything to remove keybindings, like this? Can you share what's in your
settings.json
and especiallykeybindings.json
?
update: Normal Windows uninstalling and installing again didn't help, as uninstalling won't remove many registry leftovers.
I used Revo Uninstaller to completely remove Positron and reinstalled it and the issue was fixed.
I'm going to reinstall all extensions that were previously installed and see if any lead to that bug.
Thank you both for the input and help.
Ah, see in your keybindings.json
where it has -r.insertPipeConsole
? With the -
? This was the problem; at some point (probably by accident) you did something that removed this keybinding. You can get back to the default state by removing this entry from that JSON.
Positron Version: 2024.11.0 (system setup) build 140 Code - OSS Version: 1.93.0 Commit: e0d844b031f95acbf89f234a2cce2af9b6721f6c Date: 2024-10-31T14:14:22.699Z Electron: 30.4.0 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631
R 4.4.2
Key bindings such as "Insert the pipe operator" does not work in console.
{ "key": "ctrl+shift+m", "command": "r.insertPipeConsole", "when": "editorTextFocus && editorLangId == 'quarto' || editorTextFocus && editorLangId == 'r'" }
Can this be locally fixed through changing When Expression?
Many thanks.