Skip to content

Commit

Permalink
Add tab to the list of end keycodes
Browse files Browse the repository at this point in the history
  • Loading branch information
clauderic committed Sep 20, 2024
1 parent 71dc39f commit 62a8118
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/keyboard-tab-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@dnd-kit/dom': patch
---

Added `Tab` to the list of default keycodes that end the current drag operation.
2 changes: 1 addition & 1 deletion packages/dom/src/core/sensors/keyboard/KeyboardSensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface KeyboardSensorOptions {
const DEFAULT_KEYBOARD_CODES: KeyboardCodes = {
start: ['Space', 'Enter'],
cancel: ['Escape'],
end: ['Space', 'Enter'],
end: ['Space', 'Enter', 'Tab'],
up: ['ArrowUp'],
down: ['ArrowDown'],
left: ['ArrowLeft'],
Expand Down

0 comments on commit 62a8118

Please sign in to comment.