Closed Kitenite closed 6 days ago
Ideally style edits can be made within long strings of text on selected shorter sections of text
Non-style edits to text
Exploring a few options we can use. I don't think we need to use global keys from Electron. We should use React-based hotkeys setup. A few options:
react-hotkeys-hook
and mousetrap
seem like the best apis with react-hotkeys-hook
seeming better for react and has scope support.
Keeping this open for the rest of the hotkeys as functionalities are added. We added everything that is currently supported in https://github.com/onlook-dev/onlook/pull/193
Adding another hotkey...
Seems like we're waiting on #91 for some of the smaller styling hotkeys like Bold, Italic, etc. FYI @Eejya
Describe the feature
We need to support hotkeys in our system these hotkeys will include various functionalities such as:
For Electron, there is a choice between using React component-level hotkeys vs using global Electron hotkeys. Seems like the choice should be based on context. Certain hotkeys such as zoom, copy/paste may be component-specific while other more global ones such as save may want to be electron-specific. Needs more exploration.
Note: There will be some existing hot keys implemented such as the zoom keys for this PR. Once the unified hotkeys system is in place, this should be moved into that system. https://github.com/onlook-dev/studio/commit/883f3ba543c993739bdc6eec481bd55aeecd9386