Skip to content

Commit

Permalink
chore: refine codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed May 4, 2024
1 parent 5c8c3a6 commit be362ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src-tauri/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static SELECT_ALL: Mutex<()> = Mutex::new(());
pub fn select_all(enigo: &mut Enigo) {
let _guard = SELECT_ALL.lock();

crate::utils::up_control_keys(enigo);
up_control_keys(enigo);

enigo.key_down(Key::Control);
enigo.key_click(Key::Layout('a'));
Expand Down Expand Up @@ -51,7 +51,7 @@ pub fn select_all(enigo: &mut Enigo) {
pub fn select_all(enigo: &mut Enigo) {
let _guard = SELECT_ALL.lock();

crate::utils::up_control_keys(enigo);
up_control_keys(enigo);

enigo.key_down(Key::Control);
enigo.key_click(Key::Layout('a'));
Expand Down Expand Up @@ -234,7 +234,7 @@ pub fn copy(enigo: &mut Enigo) {
pub fn paste(enigo: &mut Enigo) {
let _guard = COPY_PASTE.lock();

crate::utils::up_control_keys(enigo);
up_control_keys(enigo);

enigo.key_down(Key::Control);
enigo.key_click(Key::Layout('v'));
Expand Down Expand Up @@ -266,7 +266,7 @@ pub fn paste(enigo: &mut Enigo) {
pub fn paste(enigo: &mut Enigo) {
let _guard = COPY_PASTE.lock();

crate::utils::up_control_keys(enigo);
up_control_keys(enigo);

enigo.key_down(Key::Control);
enigo.key_click(Key::Layout('v'));
Expand Down

0 comments on commit be362ac

Please sign in to comment.