hidg0 0.2.0 → 0.2.1
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/lib/hidg0.rb +8 -6
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: e0a81b3ba765e28c93311ce860ba1078694524a1af92f5b153818e96e414468d
|
4
|
+
data.tar.gz: c6be149a743fc2a1a5960fc5ffe22c44b5feb29a76770ccec5fcad6b9d9eead9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5dce1f49b00c56d7a75bae55059e4309ad794a16eb740e9b01f299fe89d7e5bdc52bf3bb76538763ef6c605cc570852759955e5b41928f7bc0236df99016cb5
|
7
|
+
data.tar.gz: b73d5e47fcab4ea0cd4cd7c76f4ce8dd8cbdd5a6d004702f897adc81e4a048ce0b713679ab5d1f6ea1b9776f3455f5c5e69e363d4e783c2469358c7dc5aaa959
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/hidg0.rb
CHANGED
@@ -294,9 +294,9 @@ class HidG0
|
|
294
294
|
@dev, @debug = dev, debug
|
295
295
|
end
|
296
296
|
|
297
|
-
def keypress(key)
|
297
|
+
def keypress(key, duration: 0)
|
298
298
|
|
299
|
-
keydown(key); release_keys()
|
299
|
+
keydown(key); sleep(duration); release_keys()
|
300
300
|
|
301
301
|
end
|
302
302
|
|
@@ -304,7 +304,7 @@ class HidG0
|
|
304
304
|
|
305
305
|
s.gsub(/ /,'{space}').scan(/\{[^\}]+\}|./).each do |x|
|
306
306
|
|
307
|
-
if x.length == 1 and x
|
307
|
+
if x.length == 1 and x[0] != '{' then
|
308
308
|
|
309
309
|
keypress x
|
310
310
|
|
@@ -347,10 +347,12 @@ class HidG0
|
|
347
347
|
|
348
348
|
write_report(NULL_CHAR*2 + KEYS[key.to_sym].chr + NULL_CHAR*5)
|
349
349
|
|
350
|
-
else
|
350
|
+
else
|
351
351
|
|
352
|
-
|
353
|
-
|
352
|
+
# the key can be reproduced by combining tke key press with the shift key
|
353
|
+
|
354
|
+
write_report(MODIFIERS[:shift].chr + NULL_CHAR + \
|
355
|
+
KEYS[KEYS[key.to_sym]].chr + NULL_CHAR*5)
|
354
356
|
|
355
357
|
end
|
356
358
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|