Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Thomas Kuehne <thomas.kuehne@gmx.li>
|
|
Add definitions for these new events codes.
Signed-off-by: Gergo Koteles <soyer@irl.hu>
|
|
Add definition for "cover closed" event
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
|
|
Signed-off-by: Harry Cutts <hcutts@chromium.org>
|
|
|
|
|
|
Also reword a little to be more consistent with the evemu README.
|
|
The headers <stdio.h> and <unistd.h> were included twice.
Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
There main reason for this change is that versionsort is not widely
supported at the moment (for example, it is not present in FreeBSD and
the manual page for GNU C library scandir documents versionsort as GNU
extension).
|
|
It's good enough for our purpose and it is more portable. Also, because
argv[0] is not globally accessible, let's define a new global variable
for that called progname.
|
|
This makes evtest more portable. We could try to use ifdefs to include
sys/syslimits.h on FreeBSD to get PATH_MAX but it feels to be an
overkill for evtest. Let's keep it simple as just replace PATH_MAX with
4096.
NB: it's fine to leave linux/input.h there, because this header is
actually available on FreeBSD via the devel/evdev-proto port.
|
|
Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net>
|
|
Hasn't been needed since d485a1d1bd298d1eef6b65aa693ebb0994316f9c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
It is not needed for anything in the build process.
|
|
It is no longer needed since evtest-capture was deprecated.
|
|
|
|
It's not necessary to install signal handlers for SIGINT and SIGTERM
when not in grab mode, as there is nothing for evtest to do when
exiting, such as releasing the grab.
This causes problems with umockdev's event capture which relies on being
able to catch the SIGINT signal itself to know to flush its capture
buffers before exiting.
See https://github.com/martinpitt/umockdev/issues/96
|
|
This reverts commit 12d5ea5ca2d9a47a1cab06caf2b36967667a3daf.
as the problem was already fixed in
5eb4ab1c139ea38ebe6bb4acba08b09ee7d77d3c.
|
|
time element is deprecated on new input_event structure in kernel's
input.h [1]
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
Fixes build with musl libc that does not include limits.h indirectly via
other headers.
evtest.c: In function ‘scan_devices’:
evtest.c:886:14: error: ‘PATH_MAX’ undeclared (first use in this function); did you mean INT8_MAX’?
char fname[PATH_MAX];
^~~~~~~~
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Harry Cutts <hcutts@chromium.org>
|
|
evtest.c:887:9: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 53 [-Wformat-truncation=]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
Signed-off-by: Harry Cutts <hcutts@chromium.org>
|
|
Signed-off-by: Harry Cutts <hcutts@chromium.org>
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The functions are often declared as "warn unused result", which causes
compiler time warnings. Invalid user input may also lead to not entirely
correct utility behavior.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Add definition for "Pen Inserted" switch event.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Add more key definitions that were added to newer kernels, but were
missing in evtest.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The newer "Accelerometer" input device property was missing in evtest,
let's add it.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Kernel recently got a new key definition for desktop assistant key,
let's plumb it through evtest as well.
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Intentionally not printing keys here - led/snd/sw are long-term states, keys
are short term states so there's a chance that by the time the user looks at
the output, the key has already changed anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Bastien Nocera <hadess@hadess.net>
|
|
We had the wrong pointer in the names[] array for EV_SYN, so for example
codename() would print "EV_SYN" instead of "SYN_REPORT", or "EV_ABS"
instead of "SYN_DROPPED", etc.
Output from 1.31:
Event: time 1425470463.069381, -------------- SYN_REPORT ------------
Output from 1.32:
Event: time 1425470948.149794, -------------- EV_SYN ------------
Output after this patch:
Event: time 1425471209.159696, -------------- SYN_REPORT ------------
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
For easy experimentation with different buffer sizes, it is more
convenient to specify the array size to read() with sizeof(ev) instead
of having the array element count in two places.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If we fail to read the input events fast enough, recent kernels give the
SYN_DROPPED event. Highlight the event to make it obvious that we missed
some events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
evtest.c: In function ‘print_device_info’:
evtest.c:985: warning: unused variable ‘prop’
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If the --grab flag is given in capture mode, evtest keeps an EVIOCGRAB
on the device. While this grab is active, other processes will not
receive events from the kernel devices. The grab is released again
when evtest quits.
TEST=Check that the cursor is frozen when --grab option is specified.
$ evtest --grab
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The current code simply counts the number of directory entries and takes
that as the maximum event node given. That isn't true if we have a hole in the
event range after removing a device, making the last device in the list
unaccessible.
Fix this by actually looking at the event node numbers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Chris Healy <cphealy@gmail.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Chris Healy <cphealy@gmail.com>
|
|
Upstream e2d3d44b9a6efe4f3968252d4b680397a9640268
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Chris Healy <cphealy@gmail.com>
|