Open nik72619c opened 4 years ago
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—it 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—it 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.
Hi 👋 I've started looking into this, currently I've gone for Command
/ Shift
+ N
as the shortcut to create new file as it looks like control isn't possible from the discussion.
Just to let you know this is my first open source contribution, so if I've done anything wrong please do let me know. Thanks.
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.
The editor already overrides some commands which are built in to the browser. For example Ctrl-F
(for our custom "find" instead of the browser's find text) and Ctrl-H
(for "replace text" instead of opening history). So it seems like it should be possible to use Ctrl-N
if we call e.preventDefault()
in the handler. Would we want this? Or is it too confusing?
No, we can't override Ctrl-N
even by using e.preventDefault()
in the handler. In Chrome, Ctrl-N
is the default shortcut for opening a new tab, and it cannot be overridden. For more information, you can refer to this Stack Overflow thread: link to the Stack Overflow discussion.
Nature of issue?
Details about the bug: