Skip to content

Commit 9052c3a

Browse files
committed
fix hold key
1 parent 5d8314c commit 9052c3a

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ After sending the state will be set to 0 again.
5656

5757
## Changelog
5858

59+
### 1.1.5 (2018-12-28)
60+
* (Pmant) fix hold key (for values > 250ms)
61+
5962
### 1.1.4 (2018-12-25)
6063
* (Pmant) fix single key presses
6164

harmony.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,11 @@ function sendCommand(hub, id, ms, callback) {
109109
adapter.setState(id, {val: 0, ack: true});
110110
callback();
111111
} else {
112-
hubs[hub].client.requestKeyPress(obj.native.action, 'hold');
113-
const interval = setInterval(() => {hubs[hub].client.requestKeyPress(obj.native.action, 'hold');}, 100);
112+
hubs[hub].client.requestKeyPress(obj.native.action, 'hold', ms);
114113
setTimeout(() => {
115-
clearInterval(interval);
116-
//hubs[hub].client.requestKeyPress(obj.native.action, 'press');
117114
adapter.setState(id, {val: 0, ack: true});
118115
callback();
119-
}, ms-100);
116+
}, ms);
120117
}
121118
});
122119
}

io-package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"common": {
33
"name": "harmony",
4-
"version": "1.1.4",
4+
"version": "1.1.5",
55
"title": "Logitech Harmony",
66
"desc": {
77
"en": "Control your harmony activities from ioBroker",
@@ -12,6 +12,10 @@
1212
1313
],
1414
"news": {
15+
"1.1.5": {
16+
"en": "fix hold key (for values > 250ms)",
17+
"de": "fix Taste gedrückt halten (für Werte > 250ms)"
18+
},
1519
"1.1.4": {
1620
"en": "fix key pressed multiple times",
1721
"de": "fix Tasten wurden mehrfach gesendet"

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iobroker.harmony",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"engines": {
55
"node": ">=6.0.0"
66
},
@@ -23,7 +23,7 @@
2323
"dependencies": {
2424
"@harmonyhub/discover": "^1.0.5",
2525
"@iobroker/adapter-core": "^1.0.1",
26-
"harmonyhubws": "^1.0.3",
26+
"harmonyhubws": "^1.0.4",
2727
"semaphore": "~1.0.3"
2828
},
2929
"devDependencies": {

0 commit comments

Comments
 (0)