core: modifier-only keys do not reset pending key sequences

This allows nested key sequences to be used such as `ctrl+a>ctrl+b>c`.
This commit is contained in:
Mitchell Hashimoto
2024-10-09 09:45:55 -07:00
parent b65a9ebc45
commit 4ffb1c8cf9

View File

@ -1685,7 +1685,12 @@ fn maybeHandleBinding(
// No entry found. If we're not looking at the root set of the // No entry found. If we're not looking at the root set of the
// bindings we need to encode everything up to this point and // bindings we need to encode everything up to this point and
// send to the pty. // send to the pty.
if (self.keyboard.bindings != null) { //
// We also ignore modifiers so that nested sequences such as
// ctrl+a>ctrl+b>c work.
if (self.keyboard.bindings != null and
!event.key.modifier())
{
// Reset to the root set // Reset to the root set
self.keyboard.bindings = null; self.keyboard.bindings = null;