fix: do not treat modified keys as input on sequence match abort

This commit is contained in:
CJ van den Berg 2024-12-12 16:59:24 +01:00
parent 9efc72da62
commit 11301270fb
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -593,7 +593,7 @@ const BindingSet = struct {
try globals.current_sequence.append(globals_allocator, event); try globals.current_sequence.append(globals_allocator, event);
var buf: [6]u8 = undefined; var buf: [6]u8 = undefined;
const bytes = try input.ucs32_to_utf8(&[_]u32{egc}, &buf); const bytes = try input.ucs32_to_utf8(&[_]u32{egc}, &buf);
if (!input.is_non_input_key(event.key)) if ((event.modifiers == 0 or event.modifiers == input.mod.shift) and !input.is_non_input_key(event.key))
try globals.current_sequence_egc.appendSlice(globals_allocator, buf[0..bytes]); try globals.current_sequence_egc.appendSlice(globals_allocator, buf[0..bytes]);
var all_matches_impossible = true; var all_matches_impossible = true;