xinput_wrapper 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/xinput_wrapper.rb +17 -4
- metadata +25 -25
- 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: 7685727622dac6285e86dcf8095525fde1d6d129b7f210aed3ad2512138efdaa
|
4
|
+
data.tar.gz: f404c6286c440432f6b9ad26db6f8b6d36fc6e3ea0d6141baa439bf74c572e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ce3aaf5e903c982201b1ac8802b109f8388083b0e9f0de02454811e4300069a043b84a6bdf66db2604c70dec57c3a0564747d908beadf2b0216d49e4b9b0dd2
|
7
|
+
data.tar.gz: 9c2ae2545e99ba3d1a13789f5d7c24c11b15011f7a623169b1a7bfee9883a88091fcf9d182ead686df0564e9bdd384b0f8918f40f9a0374aca2f08c8a5533c1d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/xinput_wrapper.rb
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
# file: xinput_wrapper.rb
|
4
4
|
|
5
|
+
# Captures keyboard or mouse events using program xinput.
|
6
|
+
|
7
|
+
|
8
|
+
# note: To display a list of xinput devices, run the
|
9
|
+
# xinput program without any options.
|
10
|
+
|
5
11
|
require 'c32'
|
6
12
|
|
7
13
|
|
@@ -13,7 +19,14 @@ RAWKEY_RELEASE = 14
|
|
13
19
|
class XInputWrapper
|
14
20
|
using ColouredText
|
15
21
|
|
16
|
-
|
22
|
+
# device list:
|
23
|
+
# 3 = Virtual core keyboard
|
24
|
+
# 4 = Virtual core XTEST pointer (active when using VNC)
|
25
|
+
# 5 = Virtual core XTEST keyboard (active when using VNC)
|
26
|
+
# 10 = USB Optical Mouse (locally attached)
|
27
|
+
# 11 = Microsoft Wired Keyboard 600 (locally attached)
|
28
|
+
#
|
29
|
+
def initialize(device: nil, verbose: true, lookup: {}, debug: false )
|
17
30
|
|
18
31
|
# defaults to QWERTY keyboard layout
|
19
32
|
@modifiers = {
|
@@ -83,7 +96,7 @@ class XInputWrapper
|
|
83
96
|
end
|
84
97
|
|
85
98
|
def listen()
|
86
|
-
|
99
|
+
|
87
100
|
command = "xinput test-xi2 --root #{@device}"
|
88
101
|
|
89
102
|
type = 0
|
@@ -93,7 +106,7 @@ class XInputWrapper
|
|
93
106
|
|
94
107
|
IO.popen(command).each_line do |x|
|
95
108
|
|
96
|
-
|
109
|
+
print "GOT ", x
|
97
110
|
if x[/EVENT type \d \(Motion\)/] and (Time.now > (t1 + 0.06125)) then
|
98
111
|
|
99
112
|
type = x[/EVENT type (\d+)/,1].to_i
|
@@ -238,7 +251,7 @@ class XInputWrapper
|
|
238
251
|
puts 'ctrl key pressed'
|
239
252
|
end
|
240
253
|
|
241
|
-
def on_key_press(key, keycode, modifier)
|
254
|
+
def on_key_press(key, keycode, modifier=nil)
|
242
255
|
|
243
256
|
if @debug then
|
244
257
|
puts ('key: ' + key.inspect).debug
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xinput_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,31 +11,31 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|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lc3JvYmVydHNvbi5ldTAN
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAXg+9mfaTHPcbez7P0XnwGL0C4zdPwHtBUXioPwjP
|
29
|
+
okklRkFzMQnxArm8U9557g8cXY//vKp/cFBdCExE8lLxAOB9gHswJju0g99Yx7gY
|
30
|
+
iEV3TWv5qkLQ+n8zdTd8TxEyjWB6ZXOJcE+/cTq9Ly1j4bhf9QTdul02TBukEp6d
|
31
|
+
opP5/Yvt1GX0ED98olew/pm+KoKKNkcJzSgEH44O+pCfTi4h2STOFRvXVYaB3AH8
|
32
|
+
hpuUFcbxzPhBxOChGPAGZLaf7zurw8B2Q1vP75RV9gJ1M6NKU6Hlb6vMJQ3jz8qv
|
33
|
+
GIVFoKMCcJH2EImrG47doRVhQPIlxfz7d3f+FdYgnp7wtuFi/byklu1D2G8ZE8Ax
|
34
|
+
1s9Njv/guBMNkw+RV6IlpMtT0yeVvHeYTt0tPKeyrtBrSfsexA3393T7To6Ms+1s
|
35
|
+
B//EUqLB2VKtMmcrYMc2FfbLwllNLY4TRq+/lgVLoDb7oLHsiggYSLZS6lPBIQj/
|
36
|
+
YnYsDKwN5siDA79sB0fqq2ml
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
|
-
rubygems_version: 3.0.
|
86
|
+
rubygems_version: 3.0.3
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: A wrapper for the Linux utility xinput.
|
metadata.gz.sig
CHANGED
Binary file
|