This commit is contained in:
Breadway 2026-05-11 22:51:32 +08:00
parent c65e50fe1c
commit 96e42bc370
18 changed files with 125 additions and 3432 deletions

View file

@ -231,12 +231,11 @@ bread.once("bread.system.startup", function(event)
end)
-- Subscribe with a predicate filter
-- Third arg is an opts table with a 'filter' key whose value is the predicate
bread.filter("bread.device.connected", function(event)
bread.exec("xset r rate 200 40")
end, { filter = function(event)
return event.data.class == "keyboard"
end })
end, function(event)
bread.exec("xset r rate 200 40")
end)
-- Emit a custom event (for cross-module communication)
bread.emit("mymodule.something", { key = "value" })