Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
nous- committed Nov 23, 2024
0 parents commit 95c6a93
Show file tree
Hide file tree
Showing 7 changed files with 413 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Release

on:
push:
branches:
- main
release:
types: [published]

jobs:
build_and_release:
permissions: write-all
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
ext: zip

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
default: true

- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}

- name: Package release
run: |
mkdir -p package
cp target/${{ matrix.target }}/release/disable-keys.exe package/
cd package
7z a ../disable-keys.zip *
cd ..
- name: Upload release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./disable-keys.zip
asset_name: disable-keys.zip
asset_content_type: application/octet-stream
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
62 changes: 62 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "disable-keys"
version = "1.0.0"
edition = "2021"

[dependencies]
indexmap = "2.6.0"
once_cell = "1.20.2"
winapi = { version = "0.3", features = ["winuser"] }
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Disable Keys

This program disables specific keys on the Windows operating system. It is useful for gaming or other scenarios where accidental key presses are disruptive.

### Download Here

You can download the latest release from the [Releases page](https://github.com/nous-/disable-keys/releases/latest).

These binaries are provided directly from github by compiling the code from this repo directly.

### Usage

By example:

- disable-keys.exe WIN_L WIN_R: Disables the left and right Windows keys.
- disable-keys.exe SLEEP f1: Disables the sleep and f1 key

Run `disable-keys.exe --list-keys` to get a list of key names

### To run yourself

1. [Install rust](https://learn.microsoft.com/en-us/windows/dev-environment/rust/setup)
1. Navigate to this cloned repo in the terminal
1. `cargo build --release`
1. Look in target folder for output. Ie `target/release/disable-keys.exe`
24 changes: 24 additions & 0 deletions UNLICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
Loading

0 comments on commit 95c6a93

Please sign in to comment.