mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 16:05:42 +00:00
improve note select
This commit is contained in:
@@ -480,10 +480,7 @@
|
||||
// Keyboard event handling
|
||||
function handleKeyDown(event: KeyboardEvent) {
|
||||
selectionManager.handleKeyDown(event, nodes)
|
||||
}
|
||||
|
||||
function handleKeyUp(_event: KeyboardEvent) {
|
||||
// Keep for potential future use
|
||||
noteManager.handleKeyDown(event)
|
||||
}
|
||||
|
||||
async function updateStores() {
|
||||
@@ -666,16 +663,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
function globalKeyUpHandler(event: KeyboardEvent) {
|
||||
handleKeyUp(event)
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', globalKeyDownHandler)
|
||||
document.addEventListener('keyup', globalKeyUpHandler)
|
||||
|
||||
return () => {
|
||||
document.removeEventListener('keydown', globalKeyDownHandler)
|
||||
document.removeEventListener('keyup', globalKeyUpHandler)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -334,4 +334,12 @@ export class NoteManager {
|
||||
isNoteSelected(noteId: string): boolean {
|
||||
return this.selectedNoteId === noteId
|
||||
}
|
||||
|
||||
// Handle keyboard shortcuts
|
||||
handleKeyDown(event: KeyboardEvent) {
|
||||
if (event.key === 'Escape') {
|
||||
// Escape key clears selection regardless of mode
|
||||
this.clearNoteSelection()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user