-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Custom keyboard shortcuts #818
Comments
this would be awesome because we could make Zettlr have keybinds like VS Code or Atom and make a more seamless transition between various editors |
There are quite a lot of thumbs-up on this issue. That is something I don't get notified by. :D However, since a lot of people are beginning to more and more complain about the more and more keyboard shortcuts becoming more and more inaccessible because more complex, we should focus efforts on implementing that right now. Basically, it's relatively easy to implement, shouldn't take me more than a few hours maybe over Christmas. |
That was a lie. I just found out Electron only implements the en-US ANSI keyboard layout. There is literally no support for anything else, no French, German, Italian, Swedish, etc. keys. Gosh, why is tech so US-centric? |
Why, indeed. I've just tried out Zettlr, and some of the shortcuts I can't even execute on my (QWERTZ/de) keyboard layout. 😝 For example, "File-Previous File" helpfully tells me that I have to press Ctrl+[. However, [ needs me to press AltGr, and Ctrl+AltGr+[ does not do anything (clicking the menu entry works). Adjustable keyboard shortcuts would probably be useful (well, not for me, yet :D). Ideally, there are a couple of selectable predefined "maps" with applicable setttings corresponding to popular editors (e.g. VS Code, Notepad++,...) -- is there some plugin/package or so you can lean on? I would think that some other Electron-based editor has solved this problem before? CodeMirror? |
Other electron-based editors simply don't make use of so many keyboard shortcuts :D With regard to de-DE keyboard layout: Have a look at this issue to see the mess that is Electron: electron/electron#32259 Without the Electron fixing whatever the hell it is they are doing there I can't introduce custom shortcuts, because I have literally no idea what I should be transforming the keyboard shortcuts you mean into something that will result in what you expect. |
Erm, I guess you're pulling my leg? If not: what about Atom, VS Code? Anyway, point well taken, and thanks for the link. Please don't understand my comment as a feature request, it was more meant as a confirmation that custom keyboard shortcuts would indeed be useful. |
I think they use the JavaScript directly and don't create a Menu. This feels a little bit like a hack, since it basically circumvents the Menus and listens for shortcuts directly in the renderer process. But the benefit is clear: You don't have all of these problems, since the JavaScript implementation gives us everything we need. This is actually a good idea: On macOS we can leave everything as is, since it works. And for Windows and Linux, we can basically strip apart the keyboard shortcuts from the menu items, and instead implement something in the windows that listens for those shortcuts. Then we wouldn't need to wait for Electron to fix that. Once that is in the clear, we can implement custom keyboard shortcuts (since then we do know what will happen, and I have even already created a shortcut selector which works perfectly fine). EDIT: Note, I should clarify that when I speak of "keyboard shortcut" in this context, I actually mean the accelerators that can be assigned to menu items. Those accelerators are the troublemakers, keyboard shortcuts within the JavaScript code work perfectly fine. |
I confirm also that in the Portuguese QWERTY keyboard Layout, on Linux, I can not do CTRL + [ and CTRL+ ] for next and previous open note navigation. |
I would be really interested in being able to change some of the defaut keyboard shortcuts to custom keyboard shortcuts, e.g. ctrl+= is quite common for zoom in (as opposed to ctrl+shift+=). Many thanks! |
@bjohas |
I thought it could be handy to be able to add custom keyboard shortcuts for faster editing/writing. Cheers!
The text was updated successfully, but these errors were encountered: