Keyboard: clarify keypress routing logic

This commit is contained in:
Isaac Freund
2024-01-01 10:28:33 -06:00
parent 40920c7818
commit be4dbe3fe7
2 changed files with 32 additions and 36 deletions

View File

@ -40,11 +40,6 @@ pub fn add(self: *Self, new: u32) void {
self.len += 1;
}
pub fn present(self: *Self, value: u32) bool {
for (self.items[0..self.len]) |item| if (value == item) return true;
return false;
}
pub fn remove(self: *Self, old: u32) bool {
for (self.items[0..self.len], 0..) |item, idx| if (old == item) {
self.len -= 1;