swaymux/Keys/DummyKeyListener.h

42 lines
999 B
C
Raw Normal View History

//
// Created by grimmauld on 11.03.24.
//
#ifndef SWAYMUX_DUMMYKEYLISTENER_H
#define SWAYMUX_DUMMYKEYLISTENER_H
#include <utility>
#include "AbstractKeyListener.h"
class DummyKeyListener : public AbstractKeyListener {
public:
explicit DummyKeyListener(std::string description, std::string keyText) : description(std::move(description)),
keyText(std::move(keyText)),
AbstractKeyListener() {}
void handleKeyEvent(const QKeyEvent *keyEvent) const override {}
const std::string getDescription() override {
return description;
}
const std::string getKeyText() override {
return keyText;
}
[[nodiscard]] bool canAcceptKey(int key) const override {
return false;
}
private:
const std::string description;
const std::string keyText;
};
#endif //SWAYMUX_DUMMYKEYLISTENER_H