vscode-drawio icon indicating copy to clipboard operation
vscode-drawio copied to clipboard

Shortcut conflict (Ctrl+B)

Open sthulb opened this issue 4 years ago • 10 comments

When editing the text inside a shape, pressing cmd+b toggles bold, but also toggles the file browser panel.

sthulb avatar Jul 08 '20 10:07 sthulb

Is it doing both at the same time? Do you have an idea how to solve this conflict?

hediet avatar Jul 08 '20 11:07 hediet

Unfortunately, yes.

As for a solve, unsure.

sthulb avatar Jul 08 '20 12:07 sthulb

I faced a similar situation: when I open Draw.io UI in VS Code, I want to call the Command Palette by the keyboard shortcut Cmd + Shift + P, but it always toggles the right sidebar of Draw.io! Finally, I have to click the gear icon of VS Code to find the menu item.

liyang85 avatar Jul 18 '20 12:07 liyang85

Have you enabled the online mode of the extension?

hediet avatar Jul 18 '20 13:07 hediet

Hi @hediet, I didn't change any default setting, so I think I have been using the offline version. Below are the details:

image

And there is only one related setting in my settings.json, which was added by this extension itself:

"hediet.vscode-drawio.local-storage": "eyIuZHJhd2lvLWNvbmZpZyI6IntcImxhbmd1YWdlXCI6XCJcIixcImN1c3RvbUZvbnRzXCI6W10sXCJsaWJyYXJpZXNcIjpcImdlbmVyYWw7dW1sO2VyO2JwbW47Zmxvd2NoYXJ0O2Jhc2ljO2Fycm93czJcIixcImN1c3RvbUxpYnJhcmllc1wiOltcIkwuc2NyYXRjaHBhZFwiXSxcInBsdWdpbnNcIjpbXSxcInJlY2VudENvbG9yc1wiOltdLFwiZm9ybWF0V2lkdGhcIjoyNDAsXCJjcmVhdGVUYXJnZXRcIjpmYWxzZSxcInBhZ2VGb3JtYXRcIjp7XCJ4XCI6MCxcInlcIjowLFwid2lkdGhcIjo4MjcsXCJoZWlnaHRcIjoxMTY5fSxcInNlYXJjaFwiOnRydWUsXCJzaG93U3RhcnRTY3JlZW5cIjp0cnVlLFwiZ3JpZENvbG9yXCI6XCIjZDBkMGQwXCIsXCJkYXJrR3JpZENvbG9yXCI6XCIjNmU2ZTZlXCIsXCJhdXRvc2F2ZVwiOnRydWUsXCJyZXNpemVJbWFnZXNcIjpudWxsLFwib3BlbkNvdW50ZXJcIjowLFwidmVyc2lvblwiOjE4LFwidW5pdFwiOjEsXCJpc1J1bGVyT25cIjpmYWxzZSxcInVpXCI6XCJcIn0ifQ==",

liyang85 avatar Jul 20 '20 04:07 liyang85

Your issue does not happen for me on windows 10. Can you share more details?

hediet avatar Jul 20 '20 11:07 hediet

Sure.

System info copied from About Visual Studio Code:

Version: 1.47.2
Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf
Date: 2020-07-15T18:18:50.054Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0

Draw.io Integration version: v0.7.2

Anything else do you need?

liyang85 avatar Jul 20 '20 11:07 liyang85

This might be really hard to debug. Conceptually, I'm not really in control of dealing with keyboard events - I usually observe how vscode and drawio behave and try to fix what does not work (this is ugly, but there is no way around that).

Theoretically, VS Code forwards all unhandled keyboard events from drawio to vscode. Drawio calls preventDefault whenever it can handle a keyboard event, preventing Vs Code from forwarding it. I have no clue why it does not work on Mac.

Since this seem to work on windows and I don't and never will have a Mac (*), I cannot debug it and understand what is causing the problem.

(*) for the reason alone that I don't want to spend money on something I don't make money from. I hate apple for not offering a free for developer Mac VM.

hediet avatar Jul 20 '20 11:07 hediet

Got it and understood. Still thank you for the product. 😄

liyang85 avatar Jul 20 '20 13:07 liyang85

This issue seems to occur on Windows too, vscode-drawio version is 1.6.502 (Insider Build): Visual Studio Code:

Version: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z (1 wk ago)
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows NT x64 10.0.22000

Edit: issue does not occur when you try to use Ctrl+B on the entire shape, but happens when you are editing the text inside the shape Picture1

cathaypacific8747 avatar Apr 24 '22 04:04 cathaypacific8747