From 3c6ba334b54cc4cebf54f7c733d4bbf59788df5e Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Thu, 22 Mar 2018 19:26:15 +0000 Subject: [PATCH 1/6] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2b65a4e..04406f8 100644 --- a/README.md +++ b/README.md @@ -46,20 +46,25 @@ If I double-tapped and held on the second tap, then on press the function would ## Syntax ``` -thm := new TapHoldManager([ , ]) +thm := new TapHoldManager([ , holdTime := -1, ]) thm.Add("", ) ``` The `tapTime` (The amount of time allowed before a tap or hold is called) can be configured and has a default value of 200ms. +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`. The `prefix` (The prefix used for all hotkeys, default is `$`) can also be configured. -The manager can take these optional parameters. -`thm := new TapHoldManager(100, "$*")` +You can pass as many parameters as you want. +`thm := new TapHoldManager()` +`thm := new TapHoldManager(100, 200, "$*")` -When adding keys, you can also specify parameters to override the manager's default settings -`thm.Add("2", Func("MyFunc2"), 500, "~$")` +When specifying parameters, you can use `-1` to leave that parameter at it's default. +For example, if you only wish to alter the `prefix` (3rd) parameter, you could pass `-1` for the first two parameters. +`thm := new TapHoldManager(-1, -1, "$*")` + +When adding keys, you can also add the same parameters to the end to override the manager's default settings +`thm.Add("2", Func("MyFunc2"), 300, 1000, "~$")` -When specifying parameters, you can use `-1` to leave that parameter at it's default. # Integration with the Interception driver (Multiple Keyboard support) 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. From d18ad8041d8d8e71e606c66770fbadf5fa64a8fb Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Thu, 22 Mar 2018 19:26:49 +0000 Subject: [PATCH 2/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04406f8..fb0dd4c 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ When specifying parameters, you can use `-1` to leave that parameter at it's def For example, if you only wish to alter the `prefix` (3rd) parameter, you could pass `-1` for the first two parameters. `thm := new TapHoldManager(-1, -1, "$*")` -When adding keys, you can also add the same parameters to the end to override the manager's default settings +When adding keys, you can also add the same parameters to the end to override the manager's default settings `thm.Add("2", Func("MyFunc2"), 300, 1000, "~$")` From a5301c77815365089d841437e9f0831176d91ee5 Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Mon, 2 Apr 2018 18:05:07 +0100 Subject: [PATCH 3/6] Update README.md --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fb0dd4c..366b40d 100644 --- a/README.md +++ b/README.md @@ -106,11 +106,18 @@ A wrapper is included which extends the TapHoldManager class and replaces the ho ``` Instantiate `InterceptionTapHold` instead of `TapHoldManager` -`kb1 := new InterceptionTapHold(, [, , ])` +`kb1 := new InterceptionTapHold(, [, , , , ])` -In this version, the VID and PID of the device need to be passed as the first two parameters. -To get VIDs / PIDs, you can call `devices := kb1.GetKeyboardList()` -Also, the `prefix` parameter is now the `block` parameter +**Required** +`VID / PID` = The VendorID and ProductID of the device you wish to subscribe to. +To find the VID / PID of your device, you can use the Monitor demo app from the AHI project. + +**Optional** +`isMouse` = Set to true if the device is a Mouse, else leave on false. +`instance` = When using multiple identical devices, this identifies which instance to use. + If you only have one device, leave this at 1 + +`tapTime`, `block` are as THM defaults Note: Use one manager per keyboard. ``` From e6851ab7f817c09382958e368d3ac6385a75383b Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Mon, 2 Apr 2018 18:05:44 +0100 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 366b40d..5a86ad0 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ A wrapper is included which extends the TapHoldManager class and replaces the ho ``` Instantiate `InterceptionTapHold` instead of `TapHoldManager` -`kb1 := new InterceptionTapHold(, [, , , , ])` +`kb1 := new InterceptionTapHold(, [, , , , ])` **Required** `VID / PID` = The VendorID and ProductID of the device you wish to subscribe to. From 95696d2ae781f3d8f248799768667e4b0272b5ab Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Mon, 2 Apr 2018 18:06:36 +0100 Subject: [PATCH 5/6] Update README.md --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 5a86ad0..01faa51 100644 --- a/README.md +++ b/README.md @@ -116,15 +116,10 @@ To find the VID / PID of your device, you can use the Monitor demo app from the `isMouse` = Set to true if the device is a Mouse, else leave on false. `instance` = When using multiple identical devices, this identifies which instance to use. If you only have one device, leave this at 1 - -`tapTime`, `block` are as THM defaults +`block` = whether or not to block the input. Defaults to true. Note: Use one manager per keyboard. ``` kb1 := new InterceptionTapHold(0x413C, 0x2107) kb2 := new InterceptionTapHold(0x1234, 0x2107) ``` - -## Optional Parameters -`tapTime` remains the same -`prefix` is replaced by `block` - `true` to block, `false` to not block From 74a7f732bb13524abce59aa27cd7854801339d95 Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Mon, 2 Apr 2018 18:07:40 +0100 Subject: [PATCH 6/6] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 01faa51..c4b6e40 100644 --- a/README.md +++ b/README.md @@ -99,20 +99,20 @@ thm.Add("1", Func("MyFunc1")) ### AutoHotInterception Subscription Mode A wrapper is included which extends the TapHoldManager class and replaces the hotkey bind code with Interception bind code. -**Instead of** including the TapHoldManager library, **instead** include the interception version: +**Instead of** including the TapHoldManager library, include the interception version: ``` ; #include Lib\TapHoldManager.ahk #include Lib\InterceptionTapHold.ahk ``` -Instantiate `InterceptionTapHold` instead of `TapHoldManager` +Instantiate `InterceptionTapHold` **instead of** `TapHoldManager` `kb1 := new InterceptionTapHold(, [, , , , ])` -**Required** +**Required Parameters** `VID / PID` = The VendorID and ProductID of the device you wish to subscribe to. To find the VID / PID of your device, you can use the Monitor demo app from the AHI project. -**Optional** +**Optional Parameters** `isMouse` = Set to true if the device is a Mouse, else leave on false. `instance` = When using multiple identical devices, this identifies which instance to use. If you only have one device, leave this at 1