summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames Ye <jye836@gmail.com>2017-01-20 16:54:13 +1100
committerPeter Hutterer <peter.hutterer@who-t.net>2017-01-26 14:44:04 +1000
commit1f0223e9fd77d9e3d586f0e2420fc1b7a2949a85 (patch)
tree9cb0fbf955e57ea1dd14d658806df16f0b9a0de8 /doc
parent6ef816b4f5f17ef7d4bb90fca25b26205124fc78 (diff)
Add a "switch" interface for parts of the SW_* range
This will allow switch devices known to libinput to be exposed. Currently, this is SW_LID. libinput also handles switch events internally, e.g. a laptop touchpad will be disabled autmoatically when the lid is closed. This is transparent to the caller, although the caller will also receive the event. See https://bugs.freedesktop.org/show_bug.cgi?id=86223 This features is intended to be the main driver for the interface. Co-Authored-By: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: James Ye <jye836@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/switches.dox16
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 698a316..a92d791 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -22,6 +22,7 @@ header_files = \
$(srcdir)/reporting-bugs.dox \
$(srcdir)/scrolling.dox \
$(srcdir)/seats.dox \
+ $(srcdir)/switches.dox \
$(srcdir)/t440-support.dox \
$(srcdir)/tablet-support.dox \
$(srcdir)/tapping.dox \
diff --git a/doc/switches.dox b/doc/switches.dox
new file mode 100644
index 0000000..4bb2675
--- /dev/null
+++ b/doc/switches.dox
@@ -0,0 +1,16 @@
+/**
+@page switches Switches
+
+libinput supports a couple of switches. Unlike button events that come in
+press and release pairs, switches are usually toggled once and left at the
+setting for an extended period of time.
+
+Only some switches are handled by libinput, see @ref libinput_switch for a
+list of supported switches. Switch events are exposed to the caller, but
+libinput may handle some switch events internally and enable or disable
+specific features based on a switch state.
+
+The order of switch events is guaranteed to be correct, i.e., a switch will
+never send consecutive switch on, or switch off, events.
+
+*/