diff --git a/src/core/generic/application.hpp b/src/core/generic/application.hpp index e886ec8..9974144 100644 --- a/src/core/generic/application.hpp +++ b/src/core/generic/application.hpp @@ -139,10 +139,21 @@ class Application { */ virtual void on_stylus(const ipts::StylusData & /* unused */) {}; + bool prev = false; + /*! * For running application specific code that further processes touchpad samples. */ - virtual void on_touchpad(const ipts::TouchpadSample & /* unused */) {}; + virtual void on_touchpad(const ipts::TouchpadSample &sample) + { + if (!prev && sample.button) + spdlog::info("Button pressed!"); + + if (prev && !sample.button) + spdlog::info("Button released!"); + + prev = sample.button; + } private: /*!