Compare commits
1 Commits
main
...
748665ef5e
Author | SHA1 | Date | |
---|---|---|---|
748665ef5e
|
@ -2,7 +2,7 @@ name: Rust
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["master"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# mouse-free-fishing
|
# mouse-free-fishing
|
||||||
|
|
||||||
Made for Fisch (Roblox game)
|
Made for Fisch (Roblox game)
|
||||||
|
|
||||||
You can grab the latest release using [this link](https://git.tommyy.dev/tommy/mouse-free-fishing/actions/runs/latest/artifacts/mouse-free-fishing)
|
|
@ -2,7 +2,6 @@ use std::sync::{Arc, Mutex};
|
|||||||
use rdev::{simulate, Event, EventType, SimulateError};
|
use rdev::{simulate, Event, EventType, SimulateError};
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
const ENTER_KEY: rdev::Key = rdev::Key::Return;
|
|
||||||
const SPACE_KEY: rdev::Key = rdev::Key::Space;
|
const SPACE_KEY: rdev::Key = rdev::Key::Space;
|
||||||
const ESCAPE_KEY: rdev::Key = rdev::Key::Escape;
|
const ESCAPE_KEY: rdev::Key = rdev::Key::Escape;
|
||||||
const SUSPEND_KEY: rdev::Key = rdev::Key::SemiColon;
|
const SUSPEND_KEY: rdev::Key = rdev::Key::SemiColon;
|
||||||
@ -23,10 +22,6 @@ fn main() {
|
|||||||
let callback = move |event: Event| {
|
let callback = move |event: Event| {
|
||||||
let mut matched: bool = false;
|
let mut matched: bool = false;
|
||||||
match event.event_type {
|
match event.event_type {
|
||||||
EventType::KeyPress(key) if key == ENTER_KEY => {
|
|
||||||
send(EventType::KeyPress(rdev::Key::KeyS));
|
|
||||||
send(EventType::KeyRelease(rdev::Key::KeyS));
|
|
||||||
},
|
|
||||||
EventType::KeyPress(key) if key == SPACE_KEY => {
|
EventType::KeyPress(key) if key == SPACE_KEY => {
|
||||||
let suspended = suspended.lock().unwrap();
|
let suspended = suspended.lock().unwrap();
|
||||||
if *suspended {
|
if *suspended {
|
||||||
@ -42,8 +37,6 @@ fn main() {
|
|||||||
return Some(event);
|
return Some(event);
|
||||||
} else {
|
} else {
|
||||||
send(EventType::ButtonRelease(rdev::Button::Left));
|
send(EventType::ButtonRelease(rdev::Button::Left));
|
||||||
send(EventType::KeyPress(rdev::Key::BackSlash));
|
|
||||||
send(EventType::KeyRelease(rdev::Key::BackSlash));
|
|
||||||
matched = true;
|
matched = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user