mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-01-18 19:56:01 +01:00
add next line hotkey in text area intent hook
This commit is contained in:
parent
64a5bf500f
commit
5029516523
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ export const useTextAreaIntentHandler = (
|
|||
target.focus();
|
||||
}
|
||||
if (isKeyHotkey('enter', evt) || isKeyHotkey('shift+enter', evt)) {
|
||||
evt.preventDefault();
|
||||
const cursor = Cursor.fromTextAreaElement(target);
|
||||
operations.select(intent.addNewLine(cursor));
|
||||
}
|
||||
if (isKeyHotkey('mod+enter', evt)) {
|
||||
evt.preventDefault();
|
||||
const cursor = Cursor.fromTextAreaElement(target);
|
||||
operations.select(intent.addNextLine(cursor));
|
||||
|
|
Loading…
Reference in a new issue