Instead of returning a bool, to signal whether further processing should be done, return a Key. Reason being, if we want to replace a key with another, for subsequent handlers, it is a lot easier if we can modify what gets passed along, than it is to inject a key, and try to avoid loops and infinite recursion. Nevertheless, injecting keys is still possible. This is not immediately useful for the core firmware, but makes it trivially easy to upgrade keys from their normal behaviour to something special: for example, a one-shot handler can auto-promote modifiers to one-shot, simply by scheduling a promoter handler before the real one. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>pull/71/head
parent
e78b63deae
commit
aed2fc8d98
Loading…
Reference in new issue