P5.js-web-editor: Add a keyboard shortcut for adding a new file

Created on 25 Feb 2020  路  8Comments  路  Source: processing/p5.js-web-editor

Nature of issue?

  • Existing feature enhancement

Details about the bug:

  • Web browser and version: Google Chrome (Version 74.0.3729.157 (Official Build) (64-bit))
  • Operating System: Ubuntu v18.04
medium feature

Most helpful comment

I hear you! I definitely see the benefit. I feel like this actually related to #765鈥攊t would be rad to combine the New File/Folder modals, and allow users to create nested files! I think that issue may actually need to be tackled first.

Would the keyboard shortcut be Cmd/Ctrl+N?

All 8 comments

I'm wary of adding too many keyboard shortcuts. Especially since this tool is used in a lot of beginner teaching contexts, and lots of keyboard shortcuts can be kind of overwhelming/make the tool feel advanced. Open to discussion about what feel like important keyboard shortcuts!

yes in the beginning they might feel this, but as soon as they start spending time they would really love these shortcuts, and in the long run these shortcut will help them alot.

I hear you! I definitely see the benefit. I feel like this actually related to #765鈥攊t would be rad to combine the New File/Folder modals, and allow users to create nested files! I think that issue may actually need to be tackled first.

Would the keyboard shortcut be Cmd/Ctrl+N?

I would like to work on this issue if no one is working on it.

I hear you! I definitely see the benefit. I feel like this actually related to #765鈥攊t would be rad to combine the New File/Folder modals, and allow users to create nested files! I think that issue may actually need to be tackled first.

Would the keyboard shortcut be Cmd/Ctrl+N?

I don't think we can override Ctrl + N on chrome

I don't think we can override Ctrl + N on chrome

I tried testing this on CodeSandbox, which says that it has the keyboard shortcut cmd/ctrl + N for a new file. When you try this shortcut, on Chrome and Firefox, it just opens a new browser window.

You are welcome to work on this! I'd first take some time and think about what a good shortcut would be.

Should I make a pr and change the shortcut there or wait before making a pr??

Should I make a pr and change the shortcut there or wait before making a pr??

Feel free to open a PR!

I'm coming back to this issue in the midst of cleaning out stale issues. I do like having a keyboard shortcut for this, but I'm really stumped as to what it should be! Command/Control + N is the standard for desktop text editors, and in the browser, it's the standard for opening a new browser window.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aldrinjenson picture aldrinjenson  路  4Comments

andytilia picture andytilia  路  4Comments

plxity picture plxity  路  3Comments

aferriss picture aferriss  路  5Comments

zeyaoli picture zeyaoli  路  4Comments