-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkbLED.ahk
102 lines (97 loc) · 2.96 KB
/
kbLED.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#Requires AutoHotKey 2.0.10
<!F5::{ ; try to find keyboard number
Loop 10 {
startOffset := 20
Index := A_Index+startOffset
maxTT := 20
ToolTipNo := round(A_Index/(startOffset+10)*maxTT,0)+1
TT("Index: " Index,4,ToolTipNo) ; show tooltip # ToolTipNo for 4 seconds
sleep(500)
Loop 5 {
KeyboardLED("All",0, Index)
Sleep(50)
KeyboardLED("Num",-1, Index)
Sleep(50)
KeyboardLED("Caps",-1, Index)
Sleep(50)
KeyboardLED("Scroll",-1, Index)
Sleep(50)
}
}
}
<!F5::{ ; flash all LEDs
MsgBox("flash all LEDs", "Media", "T0.5")
led_flash_all1()
}
led_flash_all1() { ; flash all LEDs
Loop 5 {
KeyboardLED("All",0)
Sleep(250)
KeyboardLED("Num",-1)
Sleep(250)
KeyboardLED("Caps",-1)
Sleep(250)
KeyboardLED("Scroll",-1)
Sleep(250)
}
}
led_flash_all2() { ; flash all LEDs
Loop 7 {
KeyboardLED("All",1)
Sleep(500)
KeyboardLED("All",0)
Sleep(500)
}
}
led_flash_all→() { ; cycle all LEDs left to right
Loop 7 {
KeyboardLED("All",0)
Sleep(250)
KeyboardLED("Num",-1)
Sleep(250)
KeyboardLED("Caps",-1)
Sleep(250)
KeyboardLED("Scroll",-1)
Sleep(250)
}
}
led_flash_progress() { ; progress bar in LEDs
Loop 5 {
KeyboardLED("All",0)
Sleep(300)
KeyboardLED("Num",-1)
Sleep(300)
KeyboardLED("Num+Caps",-1)
Sleep(300)
KeyboardLED("All",-1)
Sleep(300)
}
}
led_flash_knight() { ; Knight Rider KITT cycling all LEDs ;-)
Loop 7 { ; Knight Rider KITT cycling all LEDs ;-)
KeyboardLED("Num",-1)
Sleep(300)
KeyboardLED("Caps",-1)
Sleep(300)
KeyboardLED("Scroll",-1)
Sleep(300)
KeyboardLED("Caps",-1)
Sleep(300)
}
}
/*
; Registry view of keyboard devices
; 23=0x17
; 0x23=35
Hadrwary Ids
HID\VID_1044&PID_7A03&REV_0000&MI_00 HID\VID_0665&PID_6000&REV_0088&MI_02 HID\VID_0665&PID_6000&REV_0088&MI_00
HID\VID_1044&PID_7A03&MI_00 HID\VID_0665&PID_6000&MI_02 HID\VID_0665&PID_6000&MI_00
HID\VID_1044&UP:0001_U:0006 HID\VID_0665&UP:0001_U:0006 HID\VID_0665&UP:0001_U:0006
=HID_DEVICE_SYSTEM_KEYBOARD HID_DEVICE_SYSTEM_KEYBOARD HID_DEVICE_SYSTEM_KEYBOARD
HID_DEVICE_UP:0001_U:0006 HID_DEVICE_UP:0001_U:0006 HID_DEVICE_UP:0001_U:0006
=HID_DEVICE HID_DEVICE HID_DEVICE
Device instance path PhysDevObjectName! BusNumb! =Class GUID =rankOfDrv =Address
HID\VID_1044&PID_7A03&MI_00\9&3B1E84CE&0&0000 \Device\00000135 (dec=309) 00000035 {4d36e96b-e325-11ce-bfc1-08002be10318} 00FF1003 00000001 no power mgmt
HID\VID_0665&PID_6000&MI_00\9&28BF34E4&0&0000 \Device\00000130 (dec=304) 00000034 {4d36e96b-e325-11ce-bfc1-08002be10318} 00FF1003 00000001
HID\VID_0665&PID_6000&MI_00\9&28BF34E4&0&0000 \Device\0000012e (dec=302) 00000032 {4d36e96b-e325-11ce-bfc1-08002be10318} 00FF1003 00000001
*/