Skip to content

Commit 0b2ef3a

Browse files
committed
first commit
0 parents  commit 0b2ef3a

22 files changed

+2026
-0
lines changed

.github/workflows/rust.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Input Simulator CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@stable
23+
24+
- name: Cache dependencies
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.cargo/registry
29+
~/.cargo/git
30+
target
31+
key: ubuntu-cargo-${{ hashFiles('**/Cargo.lock') }}
32+
33+
- name: Install Linux dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y libwayland-dev libxkbcommon-dev
37+
38+
- name: Build
39+
run: cargo build --release
40+
41+
- name: Prepare artifact directory
42+
run: |
43+
export VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[0].version')
44+
mkdir -p "inputsimulator-${VERSION}-linux"
45+
cp target/release/inputsimulator "inputsimulator-${VERSION}-linux/inputsimulator"
46+
47+
- name: Upload artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: inputsimulator-linux
51+
path: inputsimulator-*-linux
52+
compression-level: 9
53+
54+
- name: Create Release
55+
if: startsWith(github.ref, 'refs/tags/')
56+
uses: softprops/action-gh-release@v2
57+
with:
58+
files: inputsimulator-*-linux/*
59+
draft: false
60+
prerelease: false
61+
generate_release_notes: true

Cargo.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "inputsimulator"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[features]
7+
default = ["wayland"]
8+
wayland = []
9+
10+
[dependencies]
11+
device_query = "2.1.0"
12+
evdev-rs = "0.6.1"
13+
serde = { version = "1.0.217", features = ["derive"] }
14+
serde_json = "1.0.134"
15+
lazy_static = "1.5.0"
16+
thiserror = "2.0.9"
17+
log = "0.4.22"
18+
19+
[dependencies.libcosmic]
20+
git = "https://github.com/pop-os/libcosmic.git"
21+
features = [
22+
"winit",
23+
"wayland",
24+
"wgpu",
25+
]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 ccuqme
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
![image](https://github.com/user-attachments/assets/c7621d83-1e6b-45cf-bd51-609ebae1fd6c)
2+
3+
# AutoClicker for Keyboard and Mouse
4+
5+
This application simulates repeated key presses and mouse clicks at a specified interval. You can configure which keys or mouse buttons to simulate and use a global hotkey to toggle the simulation on or off.
6+
7+
## Features
8+
9+
- **Configurable Key Behavior**:
10+
- Hold: Simulate keys being pressed continuously.
11+
- Click: Simulate keys being pressed and released repeatedly at a set interval.
12+
- **Global Hotkeys**:
13+
- Assign a hotkey to toggle the simulation on or off (default: `F8`).
14+
15+
## Compatibility
16+
17+
- **Platforms**: Made for Linux, but there is a slight chance it might work on macOS (although unsupported) due to its `evdev` support.
18+
- **Desktop Environments**: Tested on KDE Plasma 6.2.4 and COSMIC Desktop Alpha 4.
19+
20+
## Known Issues
21+
22+
- Global hotkeys **do not work** with pure Wayland applications on the COSMIC Desktop, but they work fine with Xwayland applications (e.g., Steam and games running through Proton).
23+
- The application starts with a phantom winit window. This is a minor issue that may be addressed in the future.
24+
25+
## Building from Source
26+
27+
To build the application from source, you need to have Rust and Cargo installed. Follow these steps:
28+
29+
1. Clone the repository:
30+
```sh
31+
git clone https://github.com/ccuqme/inputsimulator.git
32+
cd inputsimulator
33+
```
34+
35+
2. Build the application:
36+
```sh
37+
cargo build --release
38+
```
39+
40+
3. The built executable will be located in the `target/release` directory.
41+
42+
## Dependencies
43+
44+
- [libcosmic](https://github.com/pop-os/libcosmic)
45+
- [evdev-rs](https://crates.io/crates/evdev-rs)
46+
- [device_query](https://crates.io/crates/device_query)
47+
- [serde](https://crates.io/crates/serde)
48+
- [lazy_static](https://crates.io/crates/lazy_static)
49+
- [thiserror](https://crates.io/crates/thiserror)
50+
- [log](https://crates.io/crates/log)
51+
52+
## Contributing
53+
54+
This is a personal project primarily made for my own use, but suggestions and contributions are always welcome! If you have ideas, encounter bugs, or want to improve the app, feel free to open an issue or submit a pull request.
55+
56+
## License
57+
58+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
59+
60+
### Third-Party Licenses
61+
62+
This application relies on third-party dependencies, which may be licensed differently. For details, refer to the [THIRD_PARTY_LICENSES.txt](THIRD_PARTY_LICENSES.txt) file.

THIRD_PARTY_LICENSES.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
libcosmic: MPL-2.0
3+
4+
evdev-rs: Apache-2.0 or MIT
5+
6+
device_query: MIT
7+
8+
serde: Apache-2.0 or MIT
9+
10+
lazy_static: Apache-2.0 or MIT
11+
12+
thiserror: Apache-2.0 or MIT
13+
14+
log: Apache-2.0 or MIT
15+
16+
For full license texts, please see:
17+
- MPL-2.0: https://www.mozilla.org/en-US/MPL/2.0/
18+
- Apache-2.0: https://www.apache.org/licenses/LICENSE-2.0
19+
- MIT: https://opensource.org/licenses/MIT

0 commit comments

Comments
 (0)