mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
core: release events should never trigger bindings
This commit is contained in:
@ -1473,12 +1473,14 @@ fn maybeHandleBinding(
|
|||||||
switch (event.action) {
|
switch (event.action) {
|
||||||
// Release events never trigger a binding but we need to check if
|
// Release events never trigger a binding but we need to check if
|
||||||
// we consumed the press event so we don't encode the release.
|
// we consumed the press event so we don't encode the release.
|
||||||
.release => if (self.keyboard.last_trigger) |last| {
|
.release => {
|
||||||
if (last == event.bindingHash()) {
|
if (self.keyboard.last_trigger) |last| {
|
||||||
// We don't reset the last trigger on release because
|
if (last == event.bindingHash()) {
|
||||||
// an apprt may send multiple release events for a single
|
// We don't reset the last trigger on release because
|
||||||
// press event.
|
// an apprt may send multiple release events for a single
|
||||||
return .consumed;
|
// press event.
|
||||||
|
return .consumed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user