From c3d055481ec1a5fb06ecf4788f8e74bbe60f68d1 Mon Sep 17 00:00:00 2001 From: Hane Date: Sun, 2 Jul 2023 18:02:57 +0200 Subject: [PATCH] Modified README.md --- README.md | 96 +++++++++++++++++++++++++++++++--------- old/howto-piusareLED.txt | 21 +++++++++ runscript.bat | 6 ++- 3 files changed, 100 insertions(+), 23 deletions(-) create mode 100644 old/howto-piusareLED.txt diff --git a/README.md b/README.md index 99a76ad..6a2a704 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,79 @@ -AHK script para hacer el payaso con el teclado. +Collection of useful scripts for keyboard remappings and mouse operation without modifying keyboard language or system locale. -## Guia +# Keyboard Remappings - piusareLite.ahk -**Activar/Desactivar con CapsLock:** + Set of key bindings meant for the ANSI US layout set to: -- H,J,K,L-LEFT, DOWN, UP, RIGHT -- P,O-PGUP, PGDN -- I,U-ctrl+X, ctrl+C -- Ñ-ctrl+V -- M-F2 -- ,-F8 -- N-ctrl+Z -- Y-ctrl+Y -- `-Del -- +-Home -- ç-End -- ´-Ins + - Facilitate the usage of spanish tilde keys without depending on a dead key. + - Remap modifier keys to accomodate a comfier usage. + - Toggle `Caps Lock` with both Shift keys. -- F-CTRL -- S-SHIFT -- A-Alt -- E-ctrl+S -- D-Esc -- C-ctrl+F, ctrl+H con S+F simultáneo +## How to use + + - While holding `Left Alt`: + - Press on any of the spanish vowel keys `(a, e, i, o, u)` to write their accented representation `(á, é, í, ó, ú)`. + - You can also write the Euro sign `€` pressing `p`, the umlaut u `ü` pressing `/` and the `ñ` with `n`. + - Press both `Shift` keys to toggle `Caps Lock`. + - `Caps Lock` key acts as another `Left Control`. + - `Left Alt` **must** be released before inputting another macro character in order to prevent writing multiple, unintended macro characters when typing quickly. + +## Compilation + + Usage of this script requires the latest version of **AutoHotKey v1** (`1.1.36.02` as of writing) with Unicode support, readily available on the project's page. It is also tested on **AutoHotKey_H v2**. + + Alternatively, you can compile the script using the built-in compiler distributed with **AutoHotKey v1** or **AutoHotKey_H v2** with `v1` binary: + + ``` + Ahk2Exe.exe /in piusareLite.ahk /out KeyboardMappings.exe + ``` + +# Mouse On Keyboard - mausuHoldo.ahk + + Keyboard layer that allows cursor interaction using only the keyboard itself. This script allows you to: + + - Move, click and hold. + - Change between two speeds. + - Hide cursor with a single keystroke. + +## How to use + + Assuming an ANSI US keyboard: + + - Enable and disable by pressing both `Alt` keys. + - Move your cursor around by holding `j`, `k`, `l` and `;`. + - Press `u` for `Single Left Mouse Click`, `i` for `Single Middle Mouse Click` and `o` for `Single Right Mouse Click`. + - Press `/` for `Mouse 4` and `p` for `Mouse 5`. + - Press `y` for `Scroll Up` and `n` for `Scroll Down`. + - Press `n` to `Hold Left Mouse Click`, `,` to `Hold Middle Mouse Click` and `.` to `Hold Right Mouse Click`. Pressing both these keys or their respective `Single` variants will let go. + - Press `h` or `'` to change between cursor speeds. + - Press `[` to hide cursor. + +## Compilation + + Usage of this script requires **AutoHotKey_H v2** with Unicode support due to it's reliance on multi threading. AutoHotKey_H v2 is available on its project's page. + + Alternatively, you can compile the script using the built-in compiler distributed with **AutoHotKey_H v2** with `v1` binary: + + ``` + Ahk2Exe.exe /in mausuHoldo.ahk /out MouseOnKeyboard.exe + ``` + +## False positive + +Windows Defender flags this script as malicious on some devices. Dealing with that would require submitting a single, compile executable for Microsoft to manually review and approve, and I'm not interested in dealing with all that. + +# Use on administrator-owned windows + +These scripts, as they stand, require elevated privileges to work within privileged windows when UAC is active due to system restrictions. Adding and testing the code required to circumvent this limitation not only would make the scripts even more unwieldy, but also woulnd't overcome all the restrictions imposed by UAC. As such, it is recommended to run these scripts as adminsitrator. A batch file is included alongside releases to facilitate this, which can be added to a scheduled task so that it is done automatically on log in. + +# Bonus + + - `mausu.ahk` is preserved as the flawed, single-threaded variand of `mausuHoldo.ahk`. + - `cmah.ahk` served its purpose: ripping some sprites from a NeoGeo game using a web-based memory watcher. + - `piusareLED.ahk` has code to light up your keyboard's lights! Kinda cool if you wanna set up some sort of visual alert. Also, it was designed to be a much more thorough key layer, meant to be used with whatever text editor, messaging app or whatever program you wanted. A text file vaguely detailing how to used is provided alongside it. + +# External Links + + - [AutoHotKey_H](https://hotkeyit.github.io/v2/) + - [How to activate UIA for Admin Rights when installing AutoHotKey](https://www.autohotkey.com/docs/v1/Program.htm#Installer_uiAccess) + - [Code to give a script uiAccess rights](https://www.autohotkey.com/board/topic/70449-enable-interaction-with-administrative-programs/) \ No newline at end of file diff --git a/old/howto-piusareLED.txt b/old/howto-piusareLED.txt new file mode 100644 index 0000000..80babbb --- /dev/null +++ b/old/howto-piusareLED.txt @@ -0,0 +1,21 @@ +**Toggle with Caps Lock:** + +- H,J,K,L-LEFT, DOWN, UP, RIGHT +- P,O-PGUP, PGDN +- I,U-ctrl+X, ctrl+C +- ;‘-ctrl+V +- M-F2 +- ,-F8 +- N-ctrl+Z +- Y-ctrl+Y +- `-Del +- +-Home +- \-End +- '-Ins + +- F-CTRL +- S-SHIFT +- A-Alt +- E-ctrl+S +- D-Esc +- C-ctrl+F, ctrl+H with simultaneous S+F \ No newline at end of file diff --git a/runscript.bat b/runscript.bat index f2594a8..d4c984a 100644 --- a/runscript.bat +++ b/runscript.bat @@ -1,2 +1,4 @@ -START /B /D "." MouseOnKeyboard.exe -START /B "." KeyboardRemappings.exe +@pushd %~dp0 +START /B MouseOnKeyboard.exe +START /B KeyboardRemappings.exe +@popd \ No newline at end of file