Support keyboard shortcuts
Currently (on macOS and Firefox), there seems to be no support for keyboard shortcuts. I would love to see support for copy, paste, and undo/redo, and a bonus for more advanced features like ctl+a and ctrl +e for start/end of line like Emacs/VSCode and other editors.
If you are open to helping me get started with the codebase, I would be willing to take a crack at it and try and open a PR, let me know.
Does not copy/paste (ctrl-c/ctrl-v) work for you? It should! If it does not work, could you please provide some details.
For shortcuts: Yes something like that is on my list, it requires some kind of configurability and additional UI elements, which first I would like to design and implement, so currently it would not be very easy to add this feature (the next new UI element will be the autocompletion dialog box, but it depends on some other features which are missing from NoteCalc, but I am on the way :) )
I will migrate my task list to GitHub so people will have a better overview about upcoming features, dependencies between them and priorities.
And thanks for your suggestion!
Copy paste does not work for me. I am running macOS 11.1 and using Firefox 84.0. Normally on macOS, the copy and paste is cmd + c and cmd + v (which doesn't work) but ctl + c and ctl + v also doesn't work as copy paste. The only keyboard shortcut that seems to work is ctl+z for undo (ctl + r types r).
Let me know if there is any other info you need!
Ok, I think this is much easier to solve than I thought. Currently I don't have access to a mac to try it out, but now that I know that the difference is that big, I will get one.
But shortly, I think the solution should be something simple like this here:
if ((e.ctrlKey || e.cmdKey /*or whatever it is called/handled in JS*/) && (e.key === 'c' || e.key === 'x')) {
update_selected_text();
if (e.key === 'x') {
render_for_reason('ctrl-x');
}
return true;
}
I will check it out, thanks!