Skip to content

Commit

Permalink
Merge pull request #1 from rafaelurben/migration-to-ahk-v2
Browse files Browse the repository at this point in the history
Migration to ahk v2
  • Loading branch information
rafaelurben authored Apr 23, 2024
2 parents 545e780 + 271bd5d commit d5bf6cb
Show file tree
Hide file tree
Showing 4 changed files with 640 additions and 459 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
id: ahk2exe
with:
in: hotkeys.ahk
out: out/hotkeys.exe
out: out/hotkeys-${{ github.ref_name }}.exe
# icon: res/icon.ico

- name: Add to release
uses: softprops/action-gh-release@v2
with:
files: out/hotkeys.exe
files: out/hotkeys-${{ github.ref_name }}.exe
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021 Rafael Urben
Copyright 2024 Rafael Urben

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
108 changes: 62 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
# AutoHotKey Utils

Autohotkey-utils gives you some very useful utils.
Autohotkey-utils gives you some useful utils as shortcuts in Windows.

Jump to [config](#config).
This script...

## Installation
- is completely portable (requires no installation)
- does not ask you for admin permissions
- allows you to use AutoHotkey hotkeys and hotstrings with no code knowledge and no AutoHotkey installation
- will update automatically if you accept its prompt to do so
- is written in [AutoHotkey v2](https://www.autohotkey.com/)

You can install this script without AutoHotKey using the .exe files found under [Releases](https://github.com/rafaelurben/autohotkey-utils/releases). Sorry to all non-Windows-users, but this is a Windows-only thing. :(

The first time you launch the script, it will ask you if you want it to automatically start everytime you log in. If you missed the chance to click yes, you can just delete the ".hotkey-temp.txt" file and reload the script.

Everytime the script reloads, it will check if there is a newer version of it available on this page and will ask you if you want to update.

Note: Windows may warn you that this script is insecure, but you can ignore this warning as long as you download the exe file from this repository. If you don't trust this exe file, you can also download the current .ahk file, but then you must also install AutoHotkey. But please note, that the update engine doesn't work when using the .ahk file!
Jump to [setup](#setup) or [config](#config).

## Current Modules

Current modules are:

<!-- no toc -->
- [InstantSearch](#instantsearch)
- [QRGenerator](#qrgenerator)
- [ClipboardURL](#clipboardurl)
- [UrlShortcuts](#urlshortcuts)
- [Drive letter open](#drive-letter-open)
- [Greek alphabet](#greek-alphabet)
- [QuickNotes](#quicknotes)
- [SoftLock](#softlock)
- [Hotstrings](#hotstrings)
- [General actions](#general-actions)

### InstantSearch

Expand All @@ -31,12 +36,12 @@ You can modify the used search engines via [settings](#settings). Settings forma

| Action | Description | Default shortcut |
| ------------------------- | ----------------------------------- | ---------------- |
| InstantSearch_1 | Search on DuckDuckGo | `Win+Q` |
| InstantSearch_2 | Search on Google | `Shift+Win+Q` |
| InstantSearch_3 | Search on Wikipedia | - |
| InstantSearch_1_Clipboard | Search on DuckDuckGo from Clipboard | - |
| InstantSearch_1_Clipboard | Search on DuckDuckGo from Clipboard | `Win+Q` |
| InstantSearch_1 | Search on DuckDuckGo | `Shift+Win+Q` |
| InstantSearch_2_Clipboard | Search on Google from Clipboard | - |
| InstantSearch_2 | Search on Google | - |
| InstantSearch_3_Clipboard | Search on Wikipedia from Clipboard | - |
| InstantSearch_3 | Search on Wikipedia | - |

---

Expand All @@ -46,10 +51,10 @@ Generate a QRCode from any text.

Note: Please use the clipboard action if you need to use multiline data.

| Action | Description | Default shortcut |
| ------------------------- | ----------------------------------- | ---------------- |
| QRGenerator_InputBox | Open Input-Window to enter text/url | `Ctrl+Win+Q` |
| QRGenerator_FromClipboard | Use data in Clipboard | `Alt+Win+Q` |
| Action | Description | Default shortcut |
| ------------------------- | ----------------------------------- | ----------------- |
| QRGenerator_FromClipboard | Use data in Clipboard | `Alt+Win+Q` |
| QRGenerator_InputBox | Open Input-Window to enter text/url | `Shift+Alt+Win+Q` |

---

Expand All @@ -60,7 +65,7 @@ Open the URL from the clipboard directly in your default browser.
| Action | Description | Default shortcut |
| ----------------------- | ---------------------------------------------- | ---------------- |
| ClipboardURL_Open | Open Url directly | `Win+O` |
| ClipboardURL_OpenEditor | Open Input-Window to modify URL before opening | `Ctrl+Win+O` |
| ClipboardURL_OpenEditor | Open Input-Window to modify URL before opening | `Shift+Win+O` |

---

Expand All @@ -72,12 +77,12 @@ Save URLs to open easily via shortcodes.

This module needs some configuration. (see [here](#create-url-shortcodes))

| Action | Description | Default shortcut |
| ---------------------- | ---------------------------------------------------------------------------------------- | ------------------- |
| UrlShortcuts_Insert | Press and enter a 2-char shortcode during a 2-second-timeframe to **paste** url or text. | `Insert` |
| UrlShortcuts_Open | Press and enter a 2-char shortcode during a 2-second-timeframe to **open** url. | `Shift+Insert` |
| UrlShortcuts_BoxInsert | Open Input-Window and enter shortcode to **paste** url or text. | `Ctrl+Insert` |
| UrlShortcuts_BoxOpen | Open Input-Window and enter shortcode to **open** url. | `Ctrl+Shift+Insert` |
| Action | Description | Default shortcut |
| ---------------------- | ------------------------------------------------------------------------------------------ | ------------------- |
| UrlShortcuts_Insert | Press and enter a 2-char shortcode during a 2-second-timeframe to **paste** url or text. | `Insert` |
| UrlShortcuts_Open | Press and enter a 2-char shortcode during a 2-second-timeframe to **open** url or command. | `Ctrl+Insert` |
| UrlShortcuts_BoxInsert | Open input window and enter shortcode to **paste** url or text. | `Shift+Insert` |
| UrlShortcuts_BoxOpen | Open input window and enter shortcode to **open** url or command. | `Shift+Ctrl+Insert` |

---

Expand All @@ -95,9 +100,9 @@ Quickly open an explorer window with the desired drive.

Quickly enter a character from the greek alphabet.

| Action | Description | Default shortcut |
| --------------- | --------------------------------------------------------- | ---------------- |
| GreekAlphabet | Press and enter the name of the letter | `Shift+Win+G` |
| Action | Description | Default shortcut |
| ------------- | -------------------------------------- | ---------------- |
| GreekAlphabet | Press and enter the name of the letter | - |

Example: `Shift+Win+G Pi Enter` or `Shift+Win+G pi Enter` (these are not the same)

Expand All @@ -111,8 +116,8 @@ Note: Please use the open action if you need to enter multiple lines.

| Action | Description | Default shortcut |
| ----------------- | ---------------------------- | ---------------- |
| QuickNotes_Create | Create e new note | `Shift+Win+N` |
| QuickNotes_Open | View and edit existing notes | `Ctrl+Win+N` |
| QuickNotes_Create | Create e new note | - |
| QuickNotes_Open | View and edit existing notes | - |

---

Expand All @@ -130,33 +135,43 @@ Press `Win+L` or `Ctrl+Alt+Delete` to exit.

### Hotstrings

This module needs some configuration. (see [here](#create-hostrings))
This module needs some configuration. (see [here](#create-hotstrings))

---

### General actions

| Action | Description | Default shortcut |
| -------------- | -------------------------------- | ---------------- |
| CloseProcess | Close a process by name | |
| ReloadFiles | Reload the script and all files | `Ctrl+Win+i` |
| Settings_Open | Open the settings page | `Shift+Win+i` |
| HoldRightMouse | Hold down the right mouse button | |
| HoldLeftMouse | Hold down the left mouse button | |
| PasteDateTime | Paste the current date and time | |
| Action | Description | Default shortcut |
| -------------- | -------------------------------------- | ---------------- |
| CloseProcess | Close a process by name | `Shift+Win+Esc` |
| Settings_Open | Open the settings page | `Shift+Win+i` |
| ReloadFiles | Reload the script and all config files | - |
| PasteDateTime | Paste the current date and time | - |
| HoldRightMouse | Hold down the right mouse button | - |
| HoldLeftMouse | Hold down the left mouse button | - |

---

## Setup

You can setup this script without AutoHotKey using the .exe files found under [Releases](https://github.com/rafaelurben/autohotkey-utils/releases).

The first time you launch the script, it will ask you if you want it to automatically start everytime you log in. If you missed the chance to click yes, you can just delete the ".hotkey-temp.txt" file and reload the script.

Everytime the script reloads, it will check if there is a newer version of it available on this page and will ask you if you want to update.

Note: Windows may warn you that this script is insecure, but you can ignore this warning as long as you download the exe file from this repository. If you don't trust this exe file, you can also download the current .ahk file, but then you must also install AutoHotkey v2. But please note that the update engine doesn't work when using the .ahk file!

## Config

You can configurate and change some things in this little "app". You can open the settings via right click on the tray icon -> Settings or via the defined keybind (default: `Shift+Win+i`).

You can also edit the settings in their corresponding files, but don't forget to reload afterwards if you edit the files directly. (default: `Ctrl+Win+i`)
You can also edit the settings in their corresponding files, but don't forget to reload afterwards if you edit the files directly.
If you edit them in the settings, this is automatically done for you after saving.

### Create URL-Shortcodes

You can modify the shortcodes used for the [UrlShortcuts](#UrlShortcuts) module in the file called "hotkey-urls.txt" or in the settings. Use the following syntax: `shortcode|url`
You can modify the shortcodes used for the [UrlShortcuts](#urlshortcuts) module in the settings. Use the following syntax: `shortcode|url`

Example:

Expand All @@ -169,7 +184,7 @@ yt|https://youtube.com

Hotstrings automatically replaces certain strings while you're typing. E.g. you type "btw" and an ending character (`-()[]{}:;'"/\,.?!`, tab or newline) and btw automatically gets replaced with "by the way".

You can create hotstrings in the file called "hotkey-hotstrings.txt". Use the following syntax: `hotstring|replacement`
You can create and modify hotstrings in the settings. Use the following syntax: `hotstring|replacement`

The hotstring syntax can be found [here](https://www.autohotkey.com/docs/Hotstrings.htm#Options). Note: Replace "::" between hotstring and replacement with "|"!

Expand All @@ -193,18 +208,19 @@ Common options:

### Modify keybinds

You can modify the keybinds used in this app in the file called "hotkey-keybinds.txt" or in the settings. Use the following syntax: `action|keybind`
You can modify the keybinds used in this app in the settings. Use the following syntax: `action|keybind`

Note: If the actions are not present in the file, the default values are used. If you want do disable a default hotkey, enter the action without a keybind. (e.g. 4th line in example)
Note: If the actions are not present in the file, the default values are used. If you want do disable a default hotkey, enter the action without a keybind. (e.g. list line in example)

The keybind syntax can be found [here](https://www.autohotkey.com/docs/Hotkeys.htm#Symbols), all actions are listed in the tables on this page. Common modifiers are also found in the table below.
The keybind syntax can be found [here](https://www.autohotkey.com/docs/Hotkeys.htm#Symbols), all actions are listed in the tables on this page. Common modifiers can also found in the table below.

Example:

```txt
InstantSearch_1_Clipboard|#Numpad1
InstantSearch_2_Clipboard|#Numpad2
InstantSearch_3_Clipboard|#Numpad3
GreekAlphabet|+#g
ReloadFiles|
```

Expand All @@ -221,7 +237,7 @@ Common modifiers:

### Settings

Some things like the search engines can be changed via settings. These are found in the settings page or the file called "hotkey-settings.txt". Use the following format: `Key||Value` Note: Use "||" here!
Some things like the search engines can be changed via settings. Use the following format: `Key||Value` Note: Use "||" here!

Note: If the keys are not present in the file, the default values are used.

Expand Down
Loading

0 comments on commit d5bf6cb

Please sign in to comment.