refactor: filter hidden commands

This commit is contained in:
CJ van den Berg 2025-12-01 21:49:23 +01:00
parent 61515cfc3a
commit a296471161
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -816,6 +816,8 @@ const BindingSet = struct {
pub const SelectMode = enum { all, no_keypad }; pub const SelectMode = enum { all, no_keypad };
fn select(select_mode: SelectMode, binding: *const Binding) bool { fn select(select_mode: SelectMode, binding: *const Binding) bool {
if (binding.commands.len == 1 and std.mem.eql(u8, binding.commands[0].command, "home_sheeran"))
return false;
return switch (select_mode) { return switch (select_mode) {
.no_keypad => blk: { .no_keypad => blk: {
for (binding.key_events) |key_event| switch (key_event.key) { for (binding.key_events) |key_event| switch (key_event.key) {