mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 03:30:08 +01:00
doc/user: write an article explaining the different contexts
This is a common question I need to answer, let's make this a link I can copy/paste instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a1e9150210
commit
00e0c17688
1 changed files with 24 additions and 0 deletions
|
|
@ -335,3 +335,27 @@ are more specialized (e.g. in-vehicle infotainment or IVI) can handle input
|
|||
devices directly but the compositor you want to use
|
||||
on your desktop needs an input stack that is more complex. And right now,
|
||||
libinput is the only input stack that exists for this use-case.
|
||||
|
||||
.. _faq_separate_contexts:
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Can I write a program to make libinput do $FOO
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
A common question is whether it's possible to write a program that can change
|
||||
libinput's behavior - specifically the libinput that is used inside the
|
||||
compositor. This indicates a misunderstanding of how libinput works:
|
||||
libinput is a library that converts kernel events into libinput events, much
|
||||
like ``sed`` reads data in, modifies it, and provides it to stdout.
|
||||
|
||||
If ``sed`` is used by a shell-script, that script has full control over how
|
||||
``sed`` processes data. In this analogy, ``sed`` is libinput and the
|
||||
shell script is the compositor. It is not possible to write a program
|
||||
to modify the behavior of the ``sed`` instance used inside that shell script
|
||||
|
||||
Writing a program that uses libinput is akin to writing a new script that
|
||||
invoke ``sed``. It will not have any effect on the original ``sed`` instance.
|
||||
|
||||
The only way to modify libinput's behavior is to use the configuration options
|
||||
exposed by the respective compositor. Those affect the libinput context inside
|
||||
the compositor and thus have an effect on the input device behavior.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue