cli: add an input subcommand
This commit is contained in:
parent
283e438d1b
commit
efae1cd16a
19 changed files with 1383 additions and 36 deletions
|
|
@ -5,6 +5,7 @@ use {
|
|||
fixed::Fixed,
|
||||
gfx_api::GfxFramebuffer,
|
||||
ifs::wl_seat::wl_pointer::{CONTINUOUS, FINGER, HORIZONTAL_SCROLL, VERTICAL_SCROLL, WHEEL},
|
||||
libinput::consts::DeviceCapability,
|
||||
video::drm::{ConnectorType, DrmError, DrmVersion},
|
||||
},
|
||||
jay_config::video::GfxApi,
|
||||
|
|
@ -167,6 +168,21 @@ pub enum InputDeviceCapability {
|
|||
Switch,
|
||||
}
|
||||
|
||||
impl InputDeviceCapability {
|
||||
pub fn to_libinput(self) -> DeviceCapability {
|
||||
use crate::libinput::consts::*;
|
||||
match self {
|
||||
InputDeviceCapability::Keyboard => LIBINPUT_DEVICE_CAP_KEYBOARD,
|
||||
InputDeviceCapability::Pointer => LIBINPUT_DEVICE_CAP_POINTER,
|
||||
InputDeviceCapability::Touch => LIBINPUT_DEVICE_CAP_TOUCH,
|
||||
InputDeviceCapability::TabletTool => LIBINPUT_DEVICE_CAP_TABLET_TOOL,
|
||||
InputDeviceCapability::TabletPad => LIBINPUT_DEVICE_CAP_TABLET_PAD,
|
||||
InputDeviceCapability::Gesture => LIBINPUT_DEVICE_CAP_GESTURE,
|
||||
InputDeviceCapability::Switch => LIBINPUT_DEVICE_CAP_SWITCH,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum InputDeviceAccelProfile {
|
||||
Flat,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue