You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `tapTime` (The amount of time allowed before a tap or hold is called) can be configured and has a default value of 200ms.
54
+
The `holdTime` (The amount of time that you need to hold a button for it to be considered a hold) defaults to the same as `tapTime`.
54
55
The `prefix` (The prefix used for all hotkeys, default is `$`) can also be configured.
55
56
56
-
The manager can take these optional parameters.
57
-
`thm := new TapHoldManager(100, "$*")`
57
+
You can pass as many parameters as you want.
58
+
`thm := new TapHoldManager()`
59
+
`thm := new TapHoldManager(100, 200, "$*")`
58
60
59
-
When adding keys, you can also specify parameters to override the manager's default settings
60
-
`thm.Add("2", Func("MyFunc2"), 500, "~$")`
61
+
When specifying parameters, you can use `-1` to leave that parameter at it's default.
62
+
For example, if you only wish to alter the `prefix` (3rd) parameter, you could pass `-1` for the first two parameters.
63
+
`thm := new TapHoldManager(-1, -1, "$*")`
64
+
65
+
When adding keys, you can also add the same parameters to the end to override the manager's default settings
66
+
`thm.Add("2", Func("MyFunc2"), 300, 1000, "~$")`
61
67
62
-
When specifying parameters, you can use `-1` to leave that parameter at it's default.
63
68
64
69
# Integration with the Interception driver (Multiple Keyboard support)
65
70
TapHoldManager can use the [Interception driver](http://www.oblita.com/interception) to add support for per-keyboard hotkeys - you can bind TapHoldManager to keys on a second keyboard, and use them completely independently of your main keyboard.
@@ -94,25 +99,27 @@ thm.Add("1", Func("MyFunc1"))
94
99
### AutoHotInterception Subscription Mode
95
100
A wrapper is included which extends the TapHoldManager class and replaces the hotkey bind code with Interception bind code.
96
101
97
-
**Instead of** including the TapHoldManager library, **instead**include the interception version:
102
+
**Instead of** including the TapHoldManager library, include the interception version:
98
103
```
99
104
; #include Lib\TapHoldManager.ahk
100
105
#include Lib\InterceptionTapHold.ahk
101
106
```
102
107
103
-
Instantiate `InterceptionTapHold` instead of `TapHoldManager`
104
-
`kb1 := new InterceptionTapHold(<VID>, <PID> [, <tapTime>, <block = true>])`
0 commit comments