mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-19 02:11:50 +08:00
feat: 新增 Linux 绝对鼠标兼容模式 #266;新增 CH9329 描述符设置
This commit is contained in:
@@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
use tokio::sync::watch;
|
||||
|
||||
use super::types::{ConsumerEvent, KeyboardEvent, MouseEvent};
|
||||
use crate::config::{Ch9329DescriptorConfig, Ch9329DescriptorState};
|
||||
use crate::error::Result;
|
||||
use crate::events::LedState;
|
||||
|
||||
@@ -21,6 +22,8 @@ pub enum HidBackendType {
|
||||
port: String,
|
||||
#[serde(default = "default_ch9329_baud_rate")]
|
||||
baud_rate: u32,
|
||||
#[serde(default)]
|
||||
hybrid_mouse: bool,
|
||||
},
|
||||
#[default]
|
||||
None,
|
||||
@@ -63,6 +66,21 @@ pub trait HidBackend: Send + Sync {
|
||||
))
|
||||
}
|
||||
|
||||
async fn apply_ch9329_descriptor(
|
||||
&self,
|
||||
_descriptor: &Ch9329DescriptorConfig,
|
||||
) -> Result<Ch9329DescriptorState> {
|
||||
Err(crate::error::AppError::BadRequest(
|
||||
"CH9329 descriptor configuration is not supported by this backend".to_string(),
|
||||
))
|
||||
}
|
||||
|
||||
async fn read_ch9329_descriptor(&self) -> Result<Ch9329DescriptorState> {
|
||||
Err(crate::error::AppError::BadRequest(
|
||||
"CH9329 descriptor reading is not supported by this backend".to_string(),
|
||||
))
|
||||
}
|
||||
|
||||
async fn reset(&self) -> Result<()>;
|
||||
|
||||
async fn shutdown(&self) -> Result<()>;
|
||||
|
||||
Reference in New Issue
Block a user