Skip to content

Commit

Permalink
added Backspace listener for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
lazToum committed Jan 19, 2025
1 parent 4ff2c01 commit 5033a2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/waldiez/containers/flow/hooks/useKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export const useKeys = (flowId: string, onSave?: ((flow: string) => void) | null
}
};
const onKeyDown = (event: KeyboardEvent | undefined) => {
if (event?.key === "Delete") {
// also on Backspace
if (event?.key === "Delete" || event?.key === "Backspace") {
if (isFlowVisible()) {
onDeleteKey(event);
}
Expand Down

0 comments on commit 5033a2b

Please sign in to comment.