mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-26 19:10:06 +01:00
Compare commits
3 commits
libevdev-1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be44b6e6a8 | ||
|
|
139b58e135 | ||
|
|
c6bf238c4e |
6 changed files with 50 additions and 5 deletions
|
|
@ -7,7 +7,7 @@ AC_PREREQ([2.62])
|
|||
|
||||
# change meson version too
|
||||
AC_INIT([libevdev],
|
||||
[1.13.5],
|
||||
[1.13.6],
|
||||
[https://gitlab.freedesktop.org/libevdev/libevdev/issues/],
|
||||
[libevdev],
|
||||
[http://freedesktop.org/wiki/Software/libevdev/])
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
|
||||
#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
|
||||
#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
|
||||
#define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */
|
||||
|
||||
#define INPUT_PROP_MAX 0x1f
|
||||
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
|
||||
|
|
@ -630,6 +631,18 @@
|
|||
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
|
||||
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
|
||||
|
||||
/*
|
||||
* Keycodes for hotkeys toggling the electronic privacy screen found on some
|
||||
* laptops on/off. Note when the embedded-controller turns on/off the eprivacy
|
||||
* screen itself then the state should be reported through drm connecter props:
|
||||
* https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
|
||||
* Except when implementing the drm connecter properties API is not possible
|
||||
* because e.g. the firmware does not allow querying the presence and/or status
|
||||
* of the eprivacy screen at boot.
|
||||
*/
|
||||
#define KEY_EPRIVACY_SCREEN_ON 0x252
|
||||
#define KEY_EPRIVACY_SCREEN_OFF 0x253
|
||||
|
||||
#define KEY_KBDINPUTASSIST_PREV 0x260
|
||||
#define KEY_KBDINPUTASSIST_NEXT 0x261
|
||||
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */
|
||||
#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */
|
||||
#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */
|
||||
#define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */
|
||||
|
||||
#define INPUT_PROP_MAX 0x1f
|
||||
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
|
||||
|
|
@ -630,6 +631,18 @@
|
|||
#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
|
||||
#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
|
||||
|
||||
/*
|
||||
* Keycodes for hotkeys toggling the electronic privacy screen found on some
|
||||
* laptops on/off. Note when the embedded-controller turns on/off the eprivacy
|
||||
* screen itself then the state should be reported through drm connecter props:
|
||||
* https://www.kernel.org/doc/html/latest/gpu/drm-kms.html#standard-connector-properties
|
||||
* Except when implementing the drm connecter properties API is not possible
|
||||
* because e.g. the firmware does not allow querying the presence and/or status
|
||||
* of the eprivacy screen at boot.
|
||||
*/
|
||||
#define KEY_EPRIVACY_SCREEN_ON 0x252
|
||||
#define KEY_EPRIVACY_SCREEN_OFF 0x253
|
||||
|
||||
#define KEY_KBDINPUTASSIST_PREV 0x260
|
||||
#define KEY_KBDINPUTASSIST_NEXT 0x261
|
||||
#define KEY_KBDINPUTASSIST_PREVGROUP 0x262
|
||||
|
|
|
|||
|
|
@ -429,6 +429,24 @@ struct ff_rumble_effect {
|
|||
__u16 weak_magnitude;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ff_haptic_effect
|
||||
* @hid_usage: hid_usage according to Haptics page (WAVEFORM_CLICK, etc.)
|
||||
* @vendor_id: the waveform vendor ID if hid_usage is in the vendor-defined range
|
||||
* @vendor_waveform_page: the vendor waveform page if hid_usage is in the vendor-defined range
|
||||
* @intensity: strength of the effect as percentage
|
||||
* @repeat_count: number of times to retrigger effect
|
||||
* @retrigger_period: time before effect is retriggered (in ms)
|
||||
*/
|
||||
struct ff_haptic_effect {
|
||||
__u16 hid_usage;
|
||||
__u16 vendor_id;
|
||||
__u8 vendor_waveform_page;
|
||||
__u16 intensity;
|
||||
__u16 repeat_count;
|
||||
__u16 retrigger_period;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ff_effect - defines force feedback effect
|
||||
* @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
|
||||
|
|
@ -465,6 +483,7 @@ struct ff_effect {
|
|||
struct ff_periodic_effect periodic;
|
||||
struct ff_condition_effect condition[2]; /* One for each axis */
|
||||
struct ff_rumble_effect rumble;
|
||||
struct ff_haptic_effect haptic;
|
||||
} u;
|
||||
};
|
||||
|
||||
|
|
@ -472,6 +491,7 @@ struct ff_effect {
|
|||
* Force feedback effect types
|
||||
*/
|
||||
|
||||
#define FF_HAPTIC 0x4f
|
||||
#define FF_RUMBLE 0x50
|
||||
#define FF_PERIODIC 0x51
|
||||
#define FF_CONSTANT 0x52
|
||||
|
|
@ -481,7 +501,7 @@ struct ff_effect {
|
|||
#define FF_INERTIA 0x56
|
||||
#define FF_RAMP 0x57
|
||||
|
||||
#define FF_EFFECT_MIN FF_RUMBLE
|
||||
#define FF_EFFECT_MIN FF_HAPTIC
|
||||
#define FF_EFFECT_MAX FF_RAMP
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1563,8 +1563,7 @@ int libevdev_get_event_value(const struct libevdev *dev, unsigned int type, unsi
|
|||
*
|
||||
* @return 0 on success, or -1 on failure.
|
||||
* @retval -1
|
||||
* - the device does not have the event type or
|
||||
* - code enabled, or the code is outside the, or
|
||||
* - the device does not have the event type or code enabled, or
|
||||
* - the code is outside the allowed limits for the given type, or
|
||||
* - the type cannot be set, or
|
||||
* - the value is not permitted for the given code.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
project('libevdev', 'c',
|
||||
version: '1.13.5', # change autotools version too
|
||||
version: '1.13.6', # change autotools version too
|
||||
license: 'MIT/Expat',
|
||||
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
|
||||
meson_version: '>= 0.56.0')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue