1
0
Fork 0
forked from wry/wry

input: add click method and middle button emulation

This commit is contained in:
Stipe Kotarac 2025-05-12 17:52:36 +02:00 committed by Julian Orth
parent 0524e01a3c
commit b20153550e
24 changed files with 598 additions and 21 deletions

View file

@ -0,0 +1,18 @@
//! Constants determining the click method of a device.
//!
//! See the libinput documentation for details.
use serde::{Deserialize, Serialize};
/// The click method of a device.
#[derive(Serialize, Deserialize, Copy, Clone, Debug, Hash, Eq, PartialEq)]
pub struct ClickMethod(pub u32);
/// No click method handling
pub const CLICK_METHOD_NONE: ClickMethod = ClickMethod(0);
/// Button area
pub const CLICK_METHOD_BUTTON_AREAS: ClickMethod = ClickMethod(1 << 0);
/// Clickfinger
pub const CLICK_METHOD_CLICKFINGER: ClickMethod = ClickMethod(1 << 1);