Skip to content

Commit

Permalink
Merge pull request #5 from almogtavor/dev
Browse files Browse the repository at this point in the history
Exe update and cases features
  • Loading branch information
almogtavor authored Jul 19, 2021
2 parents d807f14 + 72dd16f commit 3428719
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 6 deletions.
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<div align="center">
<br>
<a href="https://raw.githubusercontent.com/sindresorhus/css-in-readme-like-wat/main/readme.md">
<img src="icon.svg" width="400" height="250" alt="Click to see the source">
</a>
<br>
</div>

<sup>
<br />
<br />
<br />
</sup>


# Static Hands - Turn your Unused CapsLock Key a Superhero 🦸‍♂️🚀

⌨️ Minimal shortcuts with CapsLock that doesn't require moving hands. Super simple. No learning curve.
Expand All @@ -7,9 +22,12 @@ All of the shortcuts uses the CapsLock key, that 99% of programmers don't use 99
* Irrelevant for Vim users.

## Installation
Install [AutoHotKey](https://www.autohotkey.com/), then:
* **Option one**: Simply install the file by clicking the install-static-hands.exe.
* **Option two**: Clone project, open hands-position-fixed-keyboard --> Windows --> open run.ahk with AutoHotkey. To put ahk into effect automatically every time PC start

First of all, install [AutoHotKey](https://www.autohotkey.com/). Then:
* **Option one**: Simply install the file by running the install.bat as an administrator (makes Static Hands load on the computer's startup).
* **Option two**: Install the file by clicking the install.exe (won't move Static Hands to startup folder).
* **Option three**: Clone project, run static-hands --> Windows --> run.ahk with AutoHotkey. To put ahk into effect automatically every time PC start

* Select run.ahk, and press Ctrl+C.
* Press Win+R to open the Run dialog, then enter shell:startup and click OK or Enter. This will open the Startup folder for the current user. To instead open the folder for all users, enter shell: common startup (however, in that case, you must be an administrator to proceed).
* Right-click inside the window, and click "Paste Shortcut". The shortcut to the script should now be in the Startup folder.
Expand All @@ -25,7 +43,7 @@ For example the shortcut Ctrl+Left Arrow is a great shortcut, but in reality tha

### Available commands

#### Right Hand Key Bindings
#### Left and Right Hand Key Bindings
|Key/Commands|Function|
|:----------:|:-------|
|CapsLock+j|Left|
Expand Down Expand Up @@ -59,3 +77,12 @@ For example the shortcut Ctrl+Left Arrow is a great shortcut, but in reality tha
|:----------:|:-------|
|CapsLock+m| Move 5 words backward|
|CapsLock+.| Move 5 words forward|


### Case Changing

|Key/Commands|Function|
|:----------:|:-------|
|CapsLock+0|Upper Case|
|CapsLock+9|Lower Case|
|CapsLock+8|Title Case|
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed install-static-hands.exe
Binary file not shown.
Binary file added install.exe
Binary file not shown.
37 changes: 37 additions & 0 deletions static-hands-install.SED
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=0
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=D:\code\general\LICENSE-2.0.txt
FinishMessage=
TargetName=D:\code\ahk\static-hands\static-hands-install.exe
FriendlyName=Static Hands
AppLaunched=cmd /c [D:\code\ahk\static-hands\install.bat]
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="install.bat"
[SourceFiles]
SourceFiles0=D:\code\ahk\static-hands\
[SourceFiles0]
%FILE0%=
30 changes: 28 additions & 2 deletions windows/run.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,36 @@ CapsLock & p::Send, {blind}{Insert}
CapsLock & f::Ctrl
CapsLock & d::Shift
CapsLock & s::Alt
CapsLock & w::LWin
CAPSLOCK & w::LWin

; Speed
CapsLock & m::Send, {blind}^{Left 6}
CapsLock & .::Send, {blind}^{Right 6}

CapsLock & -::Winset, Alwaysontop, , A
; Keep window open
CapsLock & -::Winset, Alwaysontop, , A

; Change Case
CapsLock & 0::goSub, set_upper_case
CapsLock & 8::goSub, set_lower_case
CapsLock & 9::goSub, set_title_case

set_upper_case:
set_lower_case:
set_title_case:
revert_clipboard := clipboardAll
clipboard =
send ^{c}
clipWait, 0.3

if (a_thisLabel = "set_upper_case")
stringUpper, clipboard, clipboard
else if (a_thisLabel = "set_lower_case")
stringLower, clipboard, clipboard
else if (a_thisLabel = "set_title_case")
stringLower, clipboard, clipboard, T

send ^{v}
sleep 50
clipboard := revert_clipboard
return

0 comments on commit 3428719

Please sign in to comment.