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

ctrl-shift-o only works when a file is open #12741

Open
Tracked by #13192
tsmaeder opened this issue Jul 21, 2023 · 7 comments
Open
Tracked by #13192

ctrl-shift-o only works when a file is open #12741

tsmaeder opened this issue Jul 21, 2023 · 7 comments
Labels
bug bugs found in the application keybindings issues related to keybindings

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented Jul 21, 2023

Bug Description:

The shortcut ctrl-shift-o does nothing when no file is open

Steps to Reproduce:

  1. Close all editors
  2. type ctrl-shift-o
  3. Observe: nothing happens
  4. Open any file in the editor
  5. Observe: ctrl-shift-o opens the "open" quick-pick

Additional Information

  • Operating System: Windows 11
  • Theia Version: 1.39.0 master

FWIW, this works in VS Code

@tsmaeder tsmaeder added bug bugs found in the application keybindings issues related to keybindings labels Jul 21, 2023
@vince-fugnitto
Copy link
Member

@tsmaeder I believe the ctrl+o command is for Electron and when testing I confirmed it works as expected with or without editors being opened (Linux):

keybindings.registerKeybinding({
command: isOSX || !this.isElectron() ? WorkspaceCommands.OPEN.id : WorkspaceCommands.OPEN_FILE.id,
keybinding: this.isElectron() ? 'ctrlcmd+o' : 'ctrlcmd+alt+o',
});

Is it not the behavior you noticed on Windows?

@tsmaeder
Copy link
Contributor Author

tsmaeder commented Jul 24, 2023

@vince-fugnitto I have no clue what's going on technically, but on Windows in Electron,ctrl+o has no effect when no editors are open. Since VS Code can do it, it must be possible 🤷

@vince-fugnitto
Copy link
Member

@tsmaeder it seems to work on @vladarama's windows machine under both conditions which made me curious, are you sure that the dialog is not hidden behind the application window? 😄

@tsmaeder
Copy link
Contributor Author

I'm doing the same thing in VS Code and Theia, respectively: it works with an editor open, but when I close the editor in the video, I presss ctrl-o repeatedly without any effect (no messages in log either).

2023-07-24.15-17-18.mp4

@tsmaeder
Copy link
Contributor Author

Some new info: when I open yarn.lock, ctrl-o does not work, but when I open a *.json file, it works.

@vince-fugnitto
Copy link
Member

Some new info: when I open yarn.lock, ctrl-o does not work, but when I open a *.json file, it works.

@tsmaeder its really weird, not sure why you're hitting the workspace symbols command which is ctrl+shift+o (it explains why it needs an editor open due to the when context). Both @vladarama and I are properly hitting the workspace.openFile functionality:

image

@tsmaeder tsmaeder changed the title ctrl-o only works when a file is open ctrl-shift-o only works when a file is open Jul 24, 2023
@tsmaeder
Copy link
Contributor Author

🤦 it's ctrl-shift-o, of course: it's so ingrained in my muscle memory, I don't know what I'm doing, I guess 🤷 . But it's more important than ctrl-o anyway, since I rarely open a file that's not in the workspace.

@JonasHelming JonasHelming mentioned this issue Dec 19, 2023
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application keybindings issues related to keybindings
Projects
None yet
Development

No branches or pull requests

2 participants