Compare commits

..

4 Commits

Author SHA1 Message Date
a860a906b7 Spam enter to complete Shakes
All checks were successful
Rust / build (push) Successful in 1m23s
2024-10-21 21:03:04 -04:00
11d0001624 Don't permanently hold "BaskSlash"
All checks were successful
Rust / build (push) Successful in 1m21s
2024-10-20 13:18:15 -04:00
33ac041121 Auto-press "BackSlash" when releasing space (get ready for shakes)
All checks were successful
Rust / build (push) Successful in 1m20s
2024-10-20 02:56:38 -04:00
49b8ba64d0 Add download link
All checks were successful
Rust / build (push) Successful in 1m21s
2024-10-20 02:00:24 -04:00
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,5 @@
# 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)

View File

@ -2,6 +2,7 @@ use std::sync::{Arc, Mutex};
use rdev::{simulate, Event, EventType, SimulateError};
use std::process::exit;
const ENTER_KEY: rdev::Key = rdev::Key::Return;
const SPACE_KEY: rdev::Key = rdev::Key::Space;
const ESCAPE_KEY: rdev::Key = rdev::Key::Escape;
const SUSPEND_KEY: rdev::Key = rdev::Key::SemiColon;
@ -22,6 +23,10 @@ fn main() {
let callback = move |event: Event| {
let mut matched: bool = false;
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 => {
let suspended = suspended.lock().unwrap();
if *suspended {
@ -37,6 +42,8 @@ fn main() {
return Some(event);
} else {
send(EventType::ButtonRelease(rdev::Button::Left));
send(EventType::KeyPress(rdev::Key::BackSlash));
send(EventType::KeyRelease(rdev::Key::BackSlash));
matched = true;
}
},