uinput-keyboard 0.3 → 0.3.1
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 +3 -3
- data/lib/uinput/keyboard/{system_initializer.rb → initializer.rb} +2 -2
- data/lib/uinput/keyboard/version.rb +3 -1
- data/test.rb +5 -6
- data/uinput-keyboard.gemspec +3 -3
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05a16fc441a306844e0daf112c1c69668b5ffd05
|
4
|
+
data.tar.gz: ebc6fdc8fb5082947f5db997652660d3b790b203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fa9084cf61c49a6ae91796ecfc11663bcd0e8046e6a9db08933afc0abef7c4ddec5037445f6c755974f52c4a170b1fc1a51b0503af1ea9458373b7df48bf025
|
7
|
+
data.tar.gz: 84dd8bbf70bb182ea9f7fffa87adc01f5aee64fa3e6f6f42883c3d52aee70a4c72534d175e003d7206e4943694f04ff72a385df9237cc2b434d092c9849f663f
|
data/lib/uinput/keyboard.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
require 'bundler/setup'
|
2
1
|
require 'uinput/device'
|
3
2
|
require 'xkbcommon'
|
4
|
-
require "uinput/keyboard/version"
|
5
|
-
require 'uinput/keyboard/system_initializer'
|
6
3
|
|
7
4
|
module Uinput
|
8
5
|
class Keyboard < Device
|
6
|
+
require_relative "keyboard/version"
|
7
|
+
require_relative 'keyboard/initializer'
|
8
|
+
|
9
9
|
class << self
|
10
10
|
def keymap(names)
|
11
11
|
Xkbcommon::Context.new.keymap_from_names(names)
|
data/test.rb
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
require 'uinput/keyboard'
|
1
|
+
require_relative 'lib/uinput/keyboard'
|
3
2
|
|
4
3
|
begin
|
5
4
|
keymap = Uinput::Keyboard.keymap(rules: 'evdev', model: 'pc104', layout: 'de', variant: 'nodeadkeys')
|
6
5
|
keyboard = Uinput::Keyboard.new(keymap)
|
7
6
|
|
8
|
-
sleep 1
|
9
|
-
|
10
7
|
puts keyboard.sys_path
|
11
8
|
puts keyboard.dev_path
|
12
9
|
|
@@ -14,8 +11,10 @@ begin
|
|
14
11
|
puts symbols.inspect
|
15
12
|
puts keyboard.symbols_to_keycodes(*symbols).inspect
|
16
13
|
|
17
|
-
|
18
|
-
|
14
|
+
sleep 0.1 # the window manager needs some time to register the new keyboard
|
15
|
+
|
16
|
+
keyboard.type('date')
|
17
|
+
keyboard.tap(:Return)
|
19
18
|
|
20
19
|
#keyboard.type('Ѣ')
|
21
20
|
#('a'..'z').each{ |char| keyboard.tap(char) }
|
data/uinput-keyboard.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'uinput/keyboard/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "uinput-keyboard"
|
8
|
-
spec.version = Uinput::
|
8
|
+
spec.version = Uinput::Keyboard::VERSION
|
9
9
|
spec.authors = ["Christopher Aue"]
|
10
10
|
spec.email = ["mail@christopheraue.net"]
|
11
11
|
|
@@ -16,8 +16,8 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
+
spec.add_dependency "uinput-device", "~> 0.4"
|
20
|
+
spec.add_dependency "xkbcommon", "~> 0.1"
|
19
21
|
spec.add_development_dependency "bundler", "~> 1.8"
|
20
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
-
spec.add_dependency "uinput-device", "~> 0.2"
|
22
|
-
spec.add_dependency "xkbcommon", "~> 0.1"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uinput-keyboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: uinput-device
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '0.4'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: xkbcommon
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
33
|
+
version: '0.1'
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
47
|
+
version: '1.8'
|
48
|
+
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
62
|
-
type: :
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
68
|
+
version: '10.0'
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- mail@christopheraue.net
|
@@ -81,7 +81,7 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
83
|
- lib/uinput/keyboard.rb
|
84
|
-
- lib/uinput/keyboard/
|
84
|
+
- lib/uinput/keyboard/initializer.rb
|
85
85
|
- lib/uinput/keyboard/version.rb
|
86
86
|
- test.rb
|
87
87
|
- uinput-keyboard.gemspec
|
@@ -105,8 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.5.1
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Ruby wrapper around uinput to create a virtual keyboard.
|
112
112
|
test_files: []
|
113
|
+
has_rdoc:
|