spelling: custom

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2023-01-09 02:30:24 -05:00
parent 6ca852363e
commit 8c901c2585

View File

@ -13,7 +13,7 @@ pub struct Enigo {
is_x11: bool,
tfc: Option<TFC_Context>,
custom_keyboard: Option<CustomKeyboard>,
cutsom_mouse: Option<CustomMouce>,
custom_mouse: Option<CustomMouce>,
}
impl Enigo {
@ -31,7 +31,7 @@ impl Enigo {
}
/// Set custom mouse.
pub fn set_custom_mouse(&mut self, custom_mouse: CustomMouce) {
self.cutsom_mouse = Some(custom_mouse)
self.custom_mouse = Some(custom_mouse)
}
/// Get custom keyboard.
pub fn get_custom_keyboard(&mut self) -> &mut Option<CustomKeyboard> {
@ -39,7 +39,7 @@ impl Enigo {
}
/// Get custom mouse.
pub fn get_custom_mouse(&mut self) -> &mut Option<CustomMouce> {
&mut self.cutsom_mouse
&mut self.custom_mouse
}
fn tfc_key_down_or_up(&mut self, key: Key, down: bool, up: bool) -> bool {
@ -99,7 +99,7 @@ impl Default for Enigo {
None
},
custom_keyboard: None,
cutsom_mouse: None,
custom_mouse: None,
xdo: EnigoXdo::default(),
}
}
@ -118,7 +118,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_move_to(x, y);
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_move_to(x, y)
}
}
@ -127,7 +127,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_move_relative(x, y);
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_move_relative(x, y)
}
}
@ -136,7 +136,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_down(button)
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_down(button)
} else {
Ok(())
@ -147,7 +147,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_up(button)
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_up(button)
}
}
@ -156,7 +156,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_click(button)
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_click(button)
}
}
@ -165,7 +165,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_scroll_x(length)
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_scroll_x(length)
}
}
@ -174,7 +174,7 @@ impl MouseControllable for Enigo {
if self.is_x11 {
self.xdo.mouse_scroll_y(length)
} else {
if let Some(mouse) = &mut self.cutsom_mouse {
if let Some(mouse) = &mut self.custom_mouse {
mouse.mouse_scroll_y(length)
}
}