xinput_wrapperplus 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/xinput_wrapperplus.rb +15 -3
- metadata +8 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec734043c5d8c8572b0d5da6a555637b5c486c8526e69b80bef1591b4b77fe9b
|
4
|
+
data.tar.gz: 49366c4e05296bfe79deb135eaac2e49544e03dcbbab386252c48cd59d057572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138bacf2e34aa013c374afe6932d554b88e57d45c7fe1b6268727435a82950fda96232165952fbaeccf5a507848942c2d880602afdb4dd123f88e8b0683aff6c
|
7
|
+
data.tar.gz: 901bf06e728f93af941487a998f7aa28ba3696063b240ecc5e0a13fec63ea712b0b1eba89a80b6294caa982a89ebbbcdecf46445d238e52fbc370685b8808c31
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/xinput_wrapperplus.rb
CHANGED
@@ -11,19 +11,22 @@ class XInputWrapperPlus < XInputWrapper
|
|
11
11
|
|
12
12
|
def initialize(device: '3', host: 'sps', port: '59000',
|
13
13
|
topic: 'input', verbose: true, lookup: {},
|
14
|
-
debug: false, capture_all: false, keys: []
|
14
|
+
debug: false, capture_all: false, keys: [],
|
15
|
+
keypress_detection: true)
|
15
16
|
|
16
17
|
super(device: device, verbose: verbose, lookup: lookup,
|
17
18
|
debug: debug, keys: keys)
|
18
19
|
|
19
20
|
@topic, @capture_all = topic, capture_all
|
21
|
+
@keypress_detection = keypress_detection
|
22
|
+
|
20
23
|
@sps = SPSPub.new host: host, port: port
|
21
24
|
@sk = SecretKnock.new short_delay: 0.25, long_delay: 0.5,
|
22
25
|
external: self, verbose: verbose, debug: debug
|
23
26
|
@sk.detect timeout: 0.7
|
24
27
|
|
25
28
|
@a = [] # Used to store mouse gestures
|
26
|
-
@timer = nil
|
29
|
+
@timer, @t2 = nil , Time.now - 30
|
27
30
|
|
28
31
|
end
|
29
32
|
|
@@ -37,7 +40,7 @@ class XInputWrapperPlus < XInputWrapper
|
|
37
40
|
|
38
41
|
return if msg.strip.empty?
|
39
42
|
|
40
|
-
topic = [@topic, subtopic].join('/')
|
43
|
+
topic = [@topic, subtopic].compact.join('/')
|
41
44
|
|
42
45
|
@sps.notice "%s: %s" % [topic, msg]
|
43
46
|
|
@@ -45,6 +48,15 @@ class XInputWrapperPlus < XInputWrapper
|
|
45
48
|
|
46
49
|
private
|
47
50
|
|
51
|
+
def anykey_press()
|
52
|
+
|
53
|
+
if @keypress_detection and (Time.now > @t2 + 30) then
|
54
|
+
message 'keypress detected', nil
|
55
|
+
@t2 = Time.now
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
48
60
|
def on_control_key()
|
49
61
|
puts 'inside on_control_key' if @debug
|
50
62
|
@sk.knock
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xinput_wrapperplus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
MAr0EaAbP4GPbdRnYZObrq03xJQOARWVRbH726l6usXEpiepoBKFXfqGNXX6DDt/
|
36
36
|
2f3lRa47HGk7I26OxNboAPZQ
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-08-
|
38
|
+
date: 2020-08-27 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: sps-pub
|
@@ -81,22 +81,22 @@ dependencies:
|
|
81
81
|
name: xinput_wrapper
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 0.8.0
|
87
84
|
- - "~>"
|
88
85
|
- !ruby/object:Gem::Version
|
89
86
|
version: '0.8'
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.8.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.8.0
|
97
94
|
- - "~>"
|
98
95
|
- !ruby/object:Gem::Version
|
99
96
|
version: '0.8'
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 0.8.1
|
100
100
|
description:
|
101
101
|
email: james@jamesrobertson.eu
|
102
102
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|