uinput-keyboard 0.1.4 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uinput/keyboard.rb +8 -0
- data/lib/uinput/keyboard/version.rb +1 -1
- data/test.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a2456a2d30b81219abee04f64a31da51b170724
|
4
|
+
data.tar.gz: 9aaf462f74e3b92583babba97c48c9477bf8ae13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f473d72d327d7ab7db33e0fb3126b6de19390764459559e608eb583ba9226259e958f0ddef6c5eb4affae0c02e318f71229e67258e47bf4637c2afcfe8ca3e33
|
7
|
+
data.tar.gz: e8d8a189d12fddd315f936494e02544c94226808dd7abfda4e6b402f6eb898c0bab74c0a7e48312e27d20a6766b606ce9d243020522ed4de7968589904874253
|
data/lib/uinput/keyboard.rb
CHANGED
@@ -53,6 +53,14 @@ module Uinput
|
|
53
53
|
keycodes
|
54
54
|
end
|
55
55
|
|
56
|
+
def symbols_to_keycodes(*names)
|
57
|
+
symbols_to_keys(*names).map(&:code)
|
58
|
+
end
|
59
|
+
|
60
|
+
def string_to_keycodes(string)
|
61
|
+
string_to_symbols(string).map{ |symbols| symbols_to_keycodes(*symbols) }
|
62
|
+
end
|
63
|
+
|
56
64
|
private
|
57
65
|
|
58
66
|
def symbols_to_keys(*names)
|
data/test.rb
CHANGED
@@ -10,7 +10,11 @@ begin
|
|
10
10
|
puts keyboard.sys_path
|
11
11
|
puts keyboard.dev_path
|
12
12
|
|
13
|
+
puts keyboard.string_to_keycodes('DaTe!').inspect
|
14
|
+
puts keyboard.symbols_to_keycodes(:Shift_L, :d).inspect
|
15
|
+
|
13
16
|
puts keyboard.type('date').inspect
|
17
|
+
|
14
18
|
puts keyboard.tap(:Return).inspect
|
15
19
|
|
16
20
|
#keyboard.type('Ѣ')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uinput-keyboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|