summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-21add KEY_MACRO 1-30 and other keysHEADmasterThomas Kuehne1-0/+85
Signed-off-by: Thomas Kuehne <thomas.kuehne@gmx.li>
2024-04-19Add KEY_ROTATE_LOCK_TOGGLE, KEY_REFRESH_RATE_TOGGLEGergo Koteles1-0/+6
Add definitions for these new events codes. Signed-off-by: Gergo Koteles <soyer@irl.hu>
2024-04-06Add SW_MACHINE_COVERSicelo A. Mhlongo1-0/+3
Add definition for "cover closed" event Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2022-05-18evtest 1.35evtest-1.35Harry Cutts1-1/+1
Signed-off-by: Harry Cutts <hcutts@chromium.org>
2022-05-17Add BTN_STYLUS3 to key namesHarry Cutts1-0/+3
2021-03-03Request patches as GitLab merge requestsHarry Cutts1-2/+2
2021-03-03Reformat README as MarkdownHarry Cutts1-4/+6
Also reword a little to be more consistent with the evemu README.
2021-02-02Remove duplicate headersJohan Korsnes1-2/+0
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>
2020-11-24Use alphasort instead of versionsort for scandirMateusz Piotrowski1-1/+1
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).
2020-11-24Replace program_invocation_short_name with argv[0]Mateusz Piotrowski1-4/+6
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.
2020-11-24Remove PATH_MAXMateusz Piotrowski1-1/+1
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.
2020-11-16Add a basic CI runPeter Hutterer1-0/+77
Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net>
2020-11-16Drop linux/version.h from the includesPeter Hutterer1-1/+0
Hasn't been needed since d485a1d1bd298d1eef6b65aa693ebb0994316f9c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-11-16Do not check for pkg-configMateusz Piotrowski1-1/+0
It is not needed for anything in the build process.
2020-11-16Remove checks for xsltproc from configure.acMateusz Piotrowski1-6/+0
It is no longer needed since evtest-capture was deprecated.
2020-11-12Remove references to evtest-capture from INSTALLMateusz Piotrowski1-2/+1
2020-11-05Only install signal handlers in grab modeBastien Nocera1-2/+4
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
2020-10-09Revert "Add missing include of limits.h for PATH_MAX"Petr Vorel1-1/+0
This reverts commit 12d5ea5ca2d9a47a1cab06caf2b36967667a3daf. as the problem was already fixed in 5eb4ab1c139ea38ebe6bb4acba08b09ee7d77d3c.
2019-11-30Fix build on 32bit arches with 64bit time_tKhem Raj1-1/+6
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>
2019-11-24Add missing include of limits.h for PATH_MAXLeo1-0/+1
2019-08-19Add missing limits.h includeBaruch Siach1-0/+1
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>
2019-08-02evtest 1.34evtest-1.34Harry Cutts1-1/+1
Signed-off-by: Harry Cutts <hcutts@chromium.org>
2019-08-02Fix gcc warning for snprintfPeter Hutterer1-1/+1
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>
2019-08-01Merge remote-tracking branch 'hcutts/typo-and-ignore'Harry Cutts2-1/+2
2019-08-01Fix a typo in INSTALLHarry Cutts1-1/+1
Signed-off-by: Harry Cutts <hcutts@chromium.org>
2019-08-01Ignore `compile` file (generated by `autoreconf`)Harry Cutts1-0/+1
Signed-off-by: Harry Cutts <hcutts@chromium.org>
2019-07-16Add REL_WHEEL_HI_RES and REL_HWHEEL_HI_RESHarry Cutts1-0/+4
2018-06-06Change all URLs to gitlab.fdoPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-29Do not ignore return values of scanf/asprintfDmitry Torokhov1-8/+9
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>
2017-09-29Add SW_PEN_INSERTEDDmitry Torokhov1-0/+3
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>
2017-09-29Add more key definitionsDmitry Torokhov1-0/+31
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>
2017-09-29Add INPUT_PROP_ACCELEROMETERDmitry Torokhov1-0/+3
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>
2017-09-29Add KEY_ASSISTANTDmitry Torokhov1-0/+3
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>
2015-07-23evtest 1.33evtest-1.33Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-23Print switch, led, sound current state in the device descriptionPeter Hutterer1-1/+38
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>
2015-03-05Fix names for EV_SYN eventsTommi Rantala1-1/+1
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>
2015-03-05Use sizeof(ev) to specify array size to read()Tommi Rantala1-1/+1
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>
2015-03-05Highlight SYN_DROPPEDTommi Rantala1-0/+2
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>
2015-03-05Avoid compiler warning when INPUT_PROP_SEMI_MT not definedTommi Rantala1-1/+2
evtest.c: In function ‘print_device_info’: evtest.c:985: warning: unused variable ‘prop’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-05Add missing INPUT_PROP_*, KEY_*, LED_* and SW_* definitionsTommi Rantala1-1/+81
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-05More ifdefs for ancient kernel headersTommi Rantala1-9/+62
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-30Add grab flagJoseph Hwang2-9/+42
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>
2015-01-29Handle holes in the event node listsPeter Hutterer1-2/+8
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>
2014-08-08evtest 1.32evtest-1.32Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-08-08Free the file name on errorPeter Hutterer1-3/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-08-08Point users at fuser to figure out what has the device openPeter Hutterer2-2/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-31Fix build error on kernels w/o input propertiesPeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29Rename BTN_A/B/X/Y to BTN_SOUTH/EAST/NORTH/WESTPeter Hutterer1-2/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Chris Healy <cphealy@gmail.com>
2013-08-29Add KEY_ATTENDANT_* groupPeter Hutterer1-0/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Chris Healy <cphealy@gmail.com>
2013-08-29Add KEY_CAMERA_*Peter Hutterer1-0/+5
Upstream e2d3d44b9a6efe4f3968252d4b680397a9640268 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Chris Healy <cphealy@gmail.com>