-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a927a2d
Showing
16 changed files
with
772 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TouchpadToggle |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#NoTrayIcon | ||
#NoEnv | ||
#SingleInstance off | ||
|
||
SAPI := ComObjCreate("SynCtrl.SynAPICtrl.1") | ||
SDev := ComObjCreate("SynCtrl.SynDeviceCtrl.3") | ||
|
||
SAPI.Initialize() | ||
SAPI.Activate() | ||
|
||
/* | ||
first parameter is ConnectionType, 0 = Any Connection | ||
second parameter is DeviceType, 2 = TouchPad Device | ||
third parameter is QueryHandle, - 1 = automatically select the first device that meet criteria | ||
*/ | ||
DeviceHandle := SAPI.FindDevice(0,2,-1) | ||
|
||
SDev.Select(DeviceHandle) | ||
SDev.Activate() | ||
|
||
; 268435825 stands for "enable/disable" option | ||
; 1: disable;0: enable | ||
DisableFlag := SDev.GetLongProperty(268435825) | ||
|
||
if(DisableFlag = 1) | ||
{ | ||
;enable it | ||
SDev.SetLongProperty(268435825, 0) | ||
OnScreenDisplay(0, 1500) | ||
} | ||
else | ||
{ | ||
;disable it | ||
SDev.SetLongProperty(268435825, 1) | ||
OnScreenDisplay(1, 1500) | ||
} | ||
|
||
ObjRelease(SAPI) | ||
ObjRelease(SDev) | ||
|
||
ExitApp | ||
|
||
|
||
; Display Image Which Stands for Touchpad Disabled Status on screen. | ||
OnScreenDisplay(DisableStatus, time=1500) | ||
{ | ||
image_name := "" | ||
if (DisableStatus = 1) | ||
{ | ||
image_name = %A_ScriptDir%\touchpad-disable.png | ||
} | ||
else | ||
{ | ||
image_name = %A_ScriptDir%\touchpad-enable.png | ||
} | ||
|
||
ypos := A_ScreenHeight * 0.8 | ||
; Create a borderless SplashImage window | ||
SplashImage, %image_name%, b y%ypos%,,,WinTitle_touchpad_toggle | ||
; Make the window a little bit transparent. | ||
;Winset, TransColor, White 250, WinTitle_touchpad_toggle | ||
Sleep, %time% | ||
SplashImage, Off | ||
return | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.