diff --git a/Release/com.elgato.counter.streamDeckPlugin b/Release/com.elgato.counter.streamDeckPlugin index 50c7531..160f95c 100644 Binary files a/Release/com.elgato.counter.streamDeckPlugin and b/Release/com.elgato.counter.streamDeckPlugin differ diff --git a/Sources/com.elgato.counter.sdPlugin/code.html b/Sources/com.elgato.counter.sdPlugin/code.html index e831d27..2d92b54 100755 --- a/Sources/com.elgato.counter.sdPlugin/code.html +++ b/Sources/com.elgato.counter.sdPlugin/code.html @@ -14,15 +14,27 @@ var DestinationEnum = Object.freeze({"HARDWARE_AND_SOFTWARE":0, "HARDWARE_ONLY":1, "SOFTWARE_ONLY":2}) + var timer; + var counterAction = { type : "com.elgato.counter.action", onKeyDown : function(context, settings, coordinates, userDesiredState) { + + timer = setTimeout(function () { + var updatedSettings = {}; + updatedSettings["keyPressCounter"] = -1; + + counterAction.SetSettings(context, updatedSettings); + counterAction.SetTitle(context, 0); + },1500); }, onKeyUp : function(context, settings, coordinates, userDesiredState) { + clearTimeout(timer); + var keyPressCounter = 0; if(settings != null && settings.hasOwnProperty('keyPressCounter')){ keyPressCounter = settings["keyPressCounter"]; diff --git a/Sources/com.elgato.counter.sdPlugin/manifest.json b/Sources/com.elgato.counter.sdPlugin/manifest.json index 6b4a13d..9579fcd 100644 --- a/Sources/com.elgato.counter.sdPlugin/manifest.json +++ b/Sources/com.elgato.counter.sdPlugin/manifest.json @@ -22,7 +22,7 @@ "Name": "Counter", "Icon": "pluginIcon", "URL": "https://www.elgato.com/gaming/stream-deck", - "Version": "1.2", + "Version": "1.3", "OS": [ { "Platform": "mac",