fix: Send message with "enter" also do new line (#5961)

* fix: Send message with "enter" also do new line

* chore: Review fixes

* chore: Naming fixes

* chore: Minor fixes

* chore: Fix line break issue when cmd plus enter enabled
This commit is contained in:
Sivin Varghese
2022-12-06 11:25:49 +05:30
committed by GitHub
parent a82b9991b3
commit 89cfc5bbf3
4 changed files with 47 additions and 1 deletions

View File

@@ -14,6 +14,10 @@ export const hasPressedCommand = e => {
return e.metaKey;
};
export const hasPressedEnterAndNotCmdOrShift = e => {
return isEnter(e) && !hasPressedCommand(e) && !hasPressedShift(e);
};
export const hasPressedCommandAndEnter = e => {
return e.metaKey && e.keyCode === 13;
};