summaryrefslogtreecommitdiff
path: root/src/core/frontend/input.h
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-01-20 22:46:39 +0200
committerwwylele <wwylele@gmail.com>2017-03-01 23:30:57 +0200
commit1d1329af23221be31c244889609415e0fb0b2641 (patch)
tree4206317bc0e2078b1a1d4eef808e2bd475c47512 /src/core/frontend/input.h
parent3974895e08fc133c4e000c2a654f401662325718 (diff)
HID: use ButtonDevice
Diffstat (limited to 'src/core/frontend/input.h')
-rw-r--r--src/core/frontend/input.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h
index a0c51df0c..63e64ac67 100644
--- a/src/core/frontend/input.h
+++ b/src/core/frontend/input.h
@@ -94,4 +94,10 @@ std::unique_ptr<InputDeviceType> CreateDevice(const std::string& params) {
return pair->second->Create(package);
}
+/**
+ * A button device is an input device that returns bool as status.
+ * true for pressed; false for released.
+ */
+using ButtonDevice = InputDevice<bool>;
+
} // namespace Input