Skip to content

Commit

Permalink
v1.3.1 (#12)
Browse files Browse the repository at this point in the history
* Update README.md

* Update TPMouse.au3

* Update README.md

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
user726687 authored Oct 30, 2022
1 parent 5cd2438 commit 301abb2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,27 @@ Inspired by [rvaiya/warpd](https://github.com/rvaiya/warpd).
1. To activate, press `CapsLk` `C` or `LShift` `RShift` `C`. You'll see your main cursor switched to a crosshair.
2. Press `I`/`J`/`K`/`L` to move the cursor. Hold `S` to brake for more precise movement, hold `Space` to scroll vertically/horizontally.
3. Press `F`/`E`/`R` to left/right/middle click at the cursor position.
4. To quit, press `Esc` or `LShift` `RShift` `CapsLk`.
4. To quit, press `CapsLk` `Q` or `LShift` `RShift` `Q` or just `Esc`.


## Grid Mode
![image](https://user-images.githubusercontent.com/98432183/197323322-09607efb-c940-4add-95e8-660c94c18306.png)

1. To activate, press `CapsLk` `G` or `LShift` `RShift` `G`. You'll see your main cursor switched to a crosshair, and a thin grey border surrounding your screen.
1. To activate, press `CapsLk` `G` or `LShift` `RShift` `G`. You'll see your main cursor switched to a crosshair, and a thin red border surrounding your screen.
2. Press `I`/`J`/`K`/`L` to narrow down the search border.
3. Press `F`/`E`/`R` to left/right/middle click at the cursor position.
4. To quit, press `Esc` or `LShift` `RShift` `CapsLk`.
4. To quit, press `CapsLk` `Q` or `LShift` `RShift` `Q` or just `Esc`.


## Demonstration

### Inertia Mode

https://user-images.githubusercontent.com/98432183/197256799-fe5e3e8d-9a2e-4c41-bd52-31b4a287499c.mp4
https://user-images.githubusercontent.com/98432183/198895264-45823df6-8e8e-4135-9e7d-4ea9c5408c43.mp4



### Grid Mode


https://user-images.githubusercontent.com/98432183/197257714-67d517bf-c344-434c-a5cb-0c25db4bb2d4.mp4
https://user-images.githubusercontent.com/98432183/198895269-4a5b7266-f662-491c-810e-5a2d87ddfc47.mp4

31 changes: 17 additions & 14 deletions TPMouse.au3
Original file line number Diff line number Diff line change
Expand Up @@ -56,34 +56,37 @@ Func ProcessKeypress($struct)
Local Static $shiftprimed = False, $capsprimed = False
If $struct.VKey>0 and $struct.VKey<256 Then SingletonKeyState($struct.VKey,$struct.MakeCode,$struct.Flags)
Switch $struct.VKey
Case 0x10 ; shift
Case 0x10 ; shift, only set priming here because user might still press other keys before releasing
If BitAnd(0x0001,$struct.Flags) Then
If $shiftprimed Then
HotKeySet('+{c}')
HotKeySet('+{g}')
HotKeySet('+{q}')
EndIf
$shiftprimed = False
ElseIf (Not $shiftprimed) And $sks(0xA0) And $sks(0xA1) Then
HotKeySet('+{c}',UnsetSelf)
HotKeySet('+{g}',UnsetSelf)
HotKeySet('+{q}',UnsetSelf)
$shiftprimed = True
EndIf
Case 0x1B, 0x14 ; esc or caps
If 0x14 = $struct.VKey Then
If BitAnd(0x0001,$struct.Flags) Then
If $capsprimed Then
HotKeySet('{c}')
HotKeySet('{g}')
EndIf
$capsprimed = False
ElseIf Not $capsprimed Then
HotKeySet('{c}',UnsetSelf)
HotKeySet('{g}',UnsetSelf)
$capsprimed = True
Case 0x14 ; CapsLk, only set priming here because user might still press other keys before releasing
If BitAnd(0x0001,$struct.Flags) Then
If $capsprimed Then
HotKeySet('{c}')
HotKeySet('{g}')
HotKeySet('{q}')
EndIf
$capsprimed = False
ElseIf Not $capsprimed Then
HotKeySet('{c}',UnsetSelf)
HotKeySet('{g}',UnsetSelf)
HotKeySet('{q}',UnsetSelf)
$capsprimed = True
EndIf
Case 0x1B, 0x51 ; esc or Q
If BitAnd(0x0001,$struct.Flags) Then
If 0x14 = $struct.VKey And Not ($sks(0xA0) And $sks(0xA1)) Then Return
If 0x51 = $struct.VKey And Not ($sks(0xA0) And $sks(0xA1) Or $sks(0x14)) Then Return
SingletonOverlay('deactivate')
SingletonInertia('deactivate')
DllCall($user32, "bool", "SetSystemCursor", "handle", CopyIcon($hCursors[0]), "dword", 32512)
Expand Down

0 comments on commit 301abb2

Please sign in to comment.