Instead of calling the `.write` method of `ConsumerControl`/`SystemControl`, which registers the key, sends a report, then unregisters, and reports again, just `.press` it when the key is pressed, as we did before. However, since `.press` always sends a report, and so does `.releaseAll`, we can't have it the same way we do for `Keyboard`. We need to explicitly release the consumer/system key, when the triggering key is released too. Not doing so makes the key stuck, as we never release it, and that will upset the operating system very much. With this patch, we do an explicit release when the key toggles off, and thus, we support both holding the key, and allowing the OS to trigger repeat, and, the key won't be stuck, either! Fixes #120. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>pull/121/head
parent
976b835441
commit
ff4dfad195
Loading…
Reference in new issue