refacotor: simplify mod of keyboard
This commit is contained in:
parent
dff5d55f50
commit
176ed43807
@ -6,8 +6,6 @@ use cpal::{
|
|||||||
};
|
};
|
||||||
use magnum_opus::{Channels::*, Decoder as AudioDecoder};
|
use magnum_opus::{Channels::*, Decoder as AudioDecoder};
|
||||||
use sha2::{Digest, Sha256};
|
use sha2::{Digest, Sha256};
|
||||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
|
||||||
use std::sync::atomic::Ordering;
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
net::SocketAddr,
|
net::SocketAddr,
|
||||||
|
1043
src/keyboard.rs
1043
src/keyboard.rs
File diff suppressed because it is too large
Load Diff
@ -716,22 +716,3 @@ pub fn get_double_click_time() -> u32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod keyboard {
|
|
||||||
use crate::common::GrabState;
|
|
||||||
use hbb_common::{allow_err, log, message_proto::*};
|
|
||||||
use rdev::{Event, EventType, Key};
|
|
||||||
use std::sync::mpsc;
|
|
||||||
use std::thread;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pub fn _legacy_keyboard_mode(event: &Event, key_event: &KeyEvent) {
|
|
||||||
log::info!("{:?}", event);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn _client_map_keyboard_mode(event: &Event, key_event: &KeyEvent) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn _translate_keyboard_mode(event: &Event, key_event: &KeyEvent) {}
|
|
||||||
}
|
|
||||||
|
@ -542,7 +542,3 @@ pub fn get_double_click_time() -> u32 {
|
|||||||
// to-do: https://github.com/servo/core-foundation-rs/blob/786895643140fa0ee4f913d7b4aeb0c4626b2085/cocoa/src/appkit.rs#L2823
|
// to-do: https://github.com/servo/core-foundation-rs/blob/786895643140fa0ee4f913d7b4aeb0c4626b2085/cocoa/src/appkit.rs#L2823
|
||||||
500 as _
|
500 as _
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod keyboard{
|
|
||||||
|
|
||||||
}
|
|
@ -1712,17 +1712,3 @@ pub fn send_message_to_hnwd(
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod keyboard {
|
|
||||||
use crate::common::GrabState;
|
|
||||||
use hbb_common::{allow_err, log, message_proto::*};
|
|
||||||
use rdev::{Event, EventType, Key};
|
|
||||||
use std::sync::mpsc;
|
|
||||||
|
|
||||||
|
|
||||||
use crate::keyboard;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -1002,9 +1002,6 @@ pub fn handle_key_(evt: &KeyEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match evt.mode.unwrap() {
|
match evt.mode.unwrap() {
|
||||||
KeyboardMode::Legacy => {
|
|
||||||
legacy_keyboard_mode(evt);
|
|
||||||
}
|
|
||||||
KeyboardMode::Map => {
|
KeyboardMode::Map => {
|
||||||
map_keyboard_mode(evt);
|
map_keyboard_mode(evt);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user