Cancel link connection by pressing Esc (#811)

Cancels connecting links if the escape key is pressed.
This commit is contained in:
filtered
2025-03-22 05:53:13 +11:00
committed by GitHub
parent 4078e3ad8b
commit cdbc0fa5e5

View File

@@ -2917,6 +2917,11 @@ export class LGraphCanvas implements ConnectionColorContext {
block_default = true
} else if (e.key === "Escape") {
// esc
if (this.linkConnector.isConnecting) {
this.linkConnector.reset()
e.preventDefault()
return
}
this.node_panel?.close()
this.options_panel?.close()
block_default = true