fix 'mouse:' input prefix is not available

This commit is contained in:
MihailRis 2026-10-06 12:53:50 +03:00
parent 99a62710b8
commit cf35023adf
6 changed files with 18 additions and 7 deletions

View file

@ -216,10 +216,17 @@ public:
return bindings;
}
ObserverHandler addKeyCallback(Keycode key, KeyCallback callback) override {
ObserverHandler addKeyCallback(Keycode key, InputCallback callback) override {
return keyCallbacks[key].add(std::move(callback));
}
ObserverHandler addMouseCallback(Mousecode button, InputCallback callback) override {
return addKeyCallback(
static_cast<Keycode>(MOUSE_KEYS_OFFSET + static_cast<int>(button)),
std::move(callback)
);
}
const std::vector<Keycode>& getPressedKeys() const override {
return pressedKeys;
}