I would like to write a simple extension for Visual Studio Code to allow basic drag and drop copy/paste functionality but I can't find any way to be notified of mouse events. Have I overlooked something obvious or has the editor intentionally been designed to be keyboard only (well mostly)?
Note: I am referring to the TypeScript based Visual Studio Code editor not the full-blown Visual Studio.
EDIT: I should have phrased the question differently because there is indeed drag and drop copy/paste now, but it's still not clear to me how to handle mouse events in an extension.
VS Code supports multiple cursors for fast simultaneous edits. You can add secondary cursors (rendered thinner) with Alt+Click. Each cursor operates independently based on the context it sits in. A common way to add more cursors is with Shift+Alt+Down or Shift+Alt+Up that insert cursors below or above.
Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it. Alternatively, you can use Ctrl+Alt+- and Ctrl+Shift+- to navigate between files and edit locations.
You can also press ctrl + shift + I . In mac os it is control.
No.
There are currently (2021) no API features that allow for hooking into drag and drop mouse events.
In general, if you want to let an extension hook into things happening in VS Code you can do so by subscribing to certain events (search for "events" on that page).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With