further improved keyboard handling
This commit is contained in:
parent
95eb8aef84
commit
fa70d2f3f4
5 changed files with 38 additions and 13 deletions
|
|
@ -75,10 +75,14 @@ export function Editor({state, setState, onResolve, onCancel, filter, focus}: Ed
|
|||
e.preventDefault();
|
||||
setNeedCommand(false);
|
||||
// u -> pass Up
|
||||
if (e.key === "u" || e.key === "Enter" || e.key === "Tab") {
|
||||
if (e.key === "u" || e.key === "Enter" || e.key === "Tab" && !e.shiftKey) {
|
||||
onResolve(state);
|
||||
return;
|
||||
}
|
||||
if (e.key === "Tab" && e.shiftKey) {
|
||||
setNeedCommand(false);
|
||||
focusPrevElement();
|
||||
}
|
||||
// c -> Call
|
||||
if (e.key === "c") {
|
||||
// we become CallBlock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue