instalatron 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,10 +45,22 @@ def capture_sequence(vm_name)
45
45
  capture = "<enter>"
46
46
  elsif b == "\t"
47
47
  capture = "<tab>"
48
- elsif b == 32
49
- capture = " "
48
+ elsif b == " "
49
+ capture = "<spacebar>"
50
50
  elsif b == "$"
51
51
  break
52
+ #
53
+ # to print special character strings to stdout:
54
+ # puts "%.3d" % read_char
55
+ #
56
+ elsif b == "\e[C"
57
+ capture = "<Right>"
58
+ elsif b == "\e[D"
59
+ capture = "<Left>"
60
+ elsif b == "\e[B"
61
+ capture = "<Down>"
62
+ elsif b == "\e[A"
63
+ capture = "<Up>"
52
64
  else
53
65
  capture = b
54
66
  end
@@ -4,7 +4,7 @@ require 'virtualbox'
4
4
 
5
5
  module Instalatron
6
6
 
7
- VERSION = '0.1.7'
7
+ VERSION = '0.1.8'
8
8
 
9
9
  class ScriptConfig
10
10
 
@@ -217,6 +217,7 @@ module Instalatron
217
217
  k[')'] = '2a 0b aa 8b';
218
218
 
219
219
 
220
+ #showkey -s displays scancodes in Linux
220
221
  special=Hash.new;
221
222
  special['<Enter>'] = '1c 9c';
222
223
  special['<Backspace>'] = '0e 8e';
@@ -229,6 +230,8 @@ module Instalatron
229
230
 
230
231
  special['<Up>'] = '48 c8';
231
232
  special['<Down>'] = '50 d0';
233
+ special['<Right>'] = '4d cd';
234
+ special['<Left>'] = '4b cb';
232
235
  #special['<PageUp>'] = '01';
233
236
  #special['<PageDown>'] = '01';
234
237
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instalatron
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio