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