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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8507222ba56fffe3770d1bb1cf2317e0dbf31620
4
- data.tar.gz: efd23c31a82e7d9d14f6ef11c126600583989603
3
+ metadata.gz: 0a2456a2d30b81219abee04f64a31da51b170724
4
+ data.tar.gz: 9aaf462f74e3b92583babba97c48c9477bf8ae13
5
5
  SHA512:
6
- metadata.gz: aa25f055b361bca80bcc339a67ee0c1c89f437bde7e4632831f78cef35a360fc6f772f913c5b26dd09b8f8f9ce9ee348ac2a8ae8fe8e9fb94f869bccae639e26
7
- data.tar.gz: 5f537390a47a7cbfa03cf1dbbd27ba7fb381f898027b16cff1da2fab6234811d7a66833bc785b51165c6e93f4c60b289a79b15f07ba3838981e9efbbea7934b7
6
+ metadata.gz: f473d72d327d7ab7db33e0fb3126b6de19390764459559e608eb583ba9226259e958f0ddef6c5eb4affae0c02e318f71229e67258e47bf4637c2afcfe8ca3e33
7
+ data.tar.gz: e8d8a189d12fddd315f936494e02544c94226808dd7abfda4e6b402f6eb898c0bab74c0a7e48312e27d20a6766b606ce9d243020522ed4de7968589904874253
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Uinput
2
- Keyboard_VERSION = "0.1.4"
2
+ Keyboard_VERSION = "0.2"
3
3
  end
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.1.4
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-18 00:00:00.000000000 Z
11
+ date: 2015-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler