vedeu 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -2
  3. data/.travis.yml +1 -1
  4. data/README.md +2 -6
  5. data/config/rubocop_enabled.yml +0 -6
  6. data/docs/dsl/by_method/clock_time.md +4 -1
  7. data/lib/vedeu/application/application_controller.rb +2 -2
  8. data/lib/vedeu/application/controller.rb +3 -3
  9. data/lib/vedeu/borders/border.rb +6 -6
  10. data/lib/vedeu/borders/dsl.rb +26 -26
  11. data/lib/vedeu/borders/refresh.rb +2 -2
  12. data/lib/vedeu/borders/title.rb +4 -4
  13. data/lib/vedeu/buffers/refresh.rb +8 -7
  14. data/lib/vedeu/buffers/terminal.rb +1 -1
  15. data/lib/vedeu/buffers/view.rb +2 -2
  16. data/lib/vedeu/cells/clear.rb +1 -1
  17. data/lib/vedeu/cells/cursor.rb +6 -6
  18. data/lib/vedeu/cells/empty.rb +2 -2
  19. data/lib/vedeu/cells/escape.rb +6 -6
  20. data/lib/vedeu/coercers/alignment.rb +1 -1
  21. data/lib/vedeu/coercers/colour_attributes.rb +8 -16
  22. data/lib/vedeu/colours/background.rb +4 -8
  23. data/lib/vedeu/colours/colour.rb +4 -4
  24. data/lib/vedeu/colours/foreground.rb +4 -8
  25. data/lib/vedeu/colours/repository.rb +1 -1
  26. data/lib/vedeu/colours/translator.rb +6 -6
  27. data/lib/vedeu/common.rb +1 -1
  28. data/lib/vedeu/configuration/api.rb +15 -15
  29. data/lib/vedeu/configuration/configuration.rb +8 -8
  30. data/lib/vedeu/cursors/coordinate.rb +4 -4
  31. data/lib/vedeu/cursors/cursor.rb +2 -2
  32. data/lib/vedeu/distributed/client.rb +2 -2
  33. data/lib/vedeu/distributed/server.rb +8 -10
  34. data/lib/vedeu/distributed/subprocess.rb +1 -1
  35. data/lib/vedeu/distributed/uri.rb +1 -1
  36. data/lib/vedeu/dsl/cursors.rb +2 -2
  37. data/lib/vedeu/dsl/elements.rb +5 -5
  38. data/lib/vedeu/dsl/helpers/align.rb +1 -1
  39. data/lib/vedeu/dsl/helpers/attributes.rb +1 -1
  40. data/lib/vedeu/dsl/presentation.rb +15 -15
  41. data/lib/vedeu/dsl/view.rb +1 -1
  42. data/lib/vedeu/dsl/views.rb +1 -1
  43. data/lib/vedeu/editor/cursor.rb +1 -1
  44. data/lib/vedeu/editor/line.rb +2 -2
  45. data/lib/vedeu/editor/lines.rb +2 -2
  46. data/lib/vedeu/esc/borders.rb +19 -19
  47. data/lib/vedeu/esc/colours.rb +1 -1
  48. data/lib/vedeu/events/aliases.rb +3 -15
  49. data/lib/vedeu/events/event.rb +14 -14
  50. data/lib/vedeu/events/repository.rb +1 -1
  51. data/lib/vedeu/geometries/area/area.rb +5 -5
  52. data/lib/vedeu/geometries/area/dimension.rb +1 -1
  53. data/lib/vedeu/geometries/dsl/dsl.rb +7 -7
  54. data/lib/vedeu/geometries/geometry.rb +2 -2
  55. data/lib/vedeu/geometries/position.rb +6 -6
  56. data/lib/vedeu/groups/clear.rb +2 -2
  57. data/lib/vedeu/groups/group.rb +2 -2
  58. data/lib/vedeu/input/dsl.rb +1 -1
  59. data/lib/vedeu/input/key.rb +3 -3
  60. data/lib/vedeu/input/mapper.rb +2 -2
  61. data/lib/vedeu/input/read.rb +2 -4
  62. data/lib/vedeu/input/store.rb +1 -17
  63. data/lib/vedeu/input/translator.rb +49 -45
  64. data/lib/vedeu/interfaces/clear.rb +3 -3
  65. data/lib/vedeu/interfaces/dsl.rb +4 -4
  66. data/lib/vedeu/interfaces/interface.rb +2 -2
  67. data/lib/vedeu/logging/clock_time.rb +3 -3
  68. data/lib/vedeu/logging/debug.rb +14 -6
  69. data/lib/vedeu/logging/log.rb +1 -1
  70. data/lib/vedeu/menus/dsl.rb +2 -2
  71. data/lib/vedeu/menus/menu.rb +9 -9
  72. data/lib/vedeu/models/focus.rb +11 -11
  73. data/lib/vedeu/models/page.rb +1 -1
  74. data/lib/vedeu/models/row.rb +1 -1
  75. data/lib/vedeu/models/toggleable.rb +7 -7
  76. data/lib/vedeu/null/generic.rb +29 -29
  77. data/lib/vedeu/output/compressor_cache.rb +1 -11
  78. data/lib/vedeu/output/viewport.rb +4 -12
  79. data/lib/vedeu/output/write.rb +3 -3
  80. data/lib/vedeu/plugins/plugin.rb +1 -1
  81. data/lib/vedeu/presentation/colour.rb +1 -1
  82. data/lib/vedeu/presentation/presentation.rb +1 -1
  83. data/lib/vedeu/presentation/style.rb +4 -4
  84. data/lib/vedeu/renderers/all.rb +1 -14
  85. data/lib/vedeu/renderers/options.rb +1 -1
  86. data/lib/vedeu/repositories/all.rb +1 -0
  87. data/lib/vedeu/repositories/assemblage.rb +1 -1
  88. data/lib/vedeu/repositories/collection.rb +4 -4
  89. data/lib/vedeu/repositories/registerable.rb +2 -2
  90. data/lib/vedeu/repositories/repositories.rb +1 -1
  91. data/lib/vedeu/repositories/repository.rb +3 -3
  92. data/lib/vedeu/repositories/storage.rb +38 -0
  93. data/lib/vedeu/repositories/store.rb +5 -22
  94. data/lib/vedeu/runtime/application.rb +1 -1
  95. data/lib/vedeu/runtime/flags.rb +3 -3
  96. data/lib/vedeu/runtime/router.rb +3 -18
  97. data/lib/vedeu/templating/helpers.rb +5 -3
  98. data/lib/vedeu/templating/view_template.rb +26 -18
  99. data/lib/vedeu/terminal/terminal.rb +5 -5
  100. data/lib/vedeu/version.rb +1 -1
  101. data/lib/vedeu/views/chars.rb +1 -1
  102. data/lib/vedeu/views/composition.rb +4 -4
  103. data/lib/vedeu/views/default_attributes.rb +2 -2
  104. data/lib/vedeu/views/line.rb +6 -6
  105. data/lib/vedeu/views/lines.rb +1 -1
  106. data/lib/vedeu/views/stream.rb +6 -6
  107. data/lib/vedeu/views/streams.rb +1 -1
  108. data/lib/vedeu/views/view.rb +4 -4
  109. data/test/lib/vedeu/borders/border_test.rb +1 -1
  110. data/test/lib/vedeu/borders/caption_test.rb +1 -1
  111. data/test/lib/vedeu/borders/dsl_test.rb +2 -3
  112. data/test/lib/vedeu/borders/refresh_test.rb +1 -1
  113. data/test/lib/vedeu/borders/title_test.rb +1 -1
  114. data/test/lib/vedeu/buffers/buffer_test.rb +7 -7
  115. data/test/lib/vedeu/buffers/refresh_test.rb +1 -1
  116. data/test/lib/vedeu/colours/background_test.rb +27 -0
  117. data/test/lib/vedeu/colours/foreground_test.rb +27 -0
  118. data/test/lib/vedeu/cursors/cursor_test.rb +3 -3
  119. data/test/lib/vedeu/cursors/move_test.rb +1 -1
  120. data/test/lib/vedeu/cursors/refresh_test.rb +1 -1
  121. data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
  122. data/test/lib/vedeu/dsl/view_test.rb +6 -8
  123. data/test/lib/vedeu/editor/cropper_test.rb +1 -1
  124. data/test/lib/vedeu/editor/cursor_test.rb +1 -1
  125. data/test/lib/vedeu/editor/document_test.rb +1 -1
  126. data/test/lib/vedeu/editor/editor_test.rb +1 -1
  127. data/test/lib/vedeu/events/aliases_test.rb +0 -14
  128. data/test/lib/vedeu/geometries/area/area_test.rb +1 -1
  129. data/test/lib/vedeu/geometries/geometry_test.rb +1 -1
  130. data/test/lib/vedeu/geometries/move_test.rb +1 -1
  131. data/test/lib/vedeu/groups/clear_test.rb +1 -1
  132. data/test/lib/vedeu/groups/dsl_test.rb +1 -1
  133. data/test/lib/vedeu/groups/group_test.rb +1 -1
  134. data/test/lib/vedeu/groups/refresh_test.rb +1 -1
  135. data/test/lib/vedeu/input/capture_test.rb +2 -2
  136. data/test/lib/vedeu/input/store_test.rb +0 -34
  137. data/test/lib/vedeu/interfaces/clear_test.rb +1 -1
  138. data/test/lib/vedeu/interfaces/dsl_test.rb +4 -4
  139. data/test/lib/vedeu/interfaces/interface_test.rb +1 -1
  140. data/test/lib/vedeu/menus/dsl_test.rb +1 -1
  141. data/test/lib/vedeu/null/generic_test.rb +1 -1
  142. data/test/lib/vedeu/output/compressor_cache_test.rb +0 -33
  143. data/test/lib/vedeu/renderers/all_test.rb +0 -8
  144. data/test/lib/vedeu/repositories/repository_test.rb +2 -2
  145. data/test/lib/vedeu/repositories/storage_test.rb +74 -0
  146. data/test/lib/vedeu/repositories/store_test.rb +10 -28
  147. data/test/lib/vedeu/runtime/router_test.rb +0 -8
  148. data/test/lib/vedeu/views/default_attributes_test.rb +5 -5
  149. data/test/lib/vedeu/views/view_test.rb +5 -2
  150. data/test/test_helper.rb +1 -1
  151. data/vedeu.gemspec +1 -1
  152. metadata +7 -4
@@ -90,8 +90,8 @@ module Vedeu
90
90
 
91
91
  new(name, block, options).bind
92
92
  end
93
- alias_method :event, :bind
94
- alias_method :register, :bind
93
+ alias event bind
94
+ alias register bind
95
95
 
96
96
  # {include:file:docs/dsl/by_method/bound.md}
97
97
  # @param name [Symbol]
@@ -138,13 +138,13 @@ module Vedeu
138
138
 
139
139
  # @see Vedeu::Events::Event.bind
140
140
  def bind
141
- if repository.registered?(name)
142
- new_collection = repository.find(name).add(self)
141
+ new_collection = if repository.registered?(name)
142
+ repository.find(name).add(self)
143
143
 
144
- else
145
- new_collection = Vedeu::Events::Collection.new([self], nil, name)
144
+ else
145
+ Vedeu::Events::Collection.new([self], nil, name)
146
146
 
147
- end
147
+ end
148
148
 
149
149
  repository.store(new_collection)
150
150
 
@@ -185,16 +185,16 @@ module Vedeu
185
185
  @executed_at = @now # set execution time to now
186
186
  @now = 0 # reset now
187
187
 
188
- if args.size > 1
189
- message = "Triggering: '#{name.inspect}' with #{args.inspect}"
188
+ message = if args.size > 1
189
+ "Triggering: '#{name.inspect}' with #{args.inspect}"
190
190
 
191
- elsif args.one?
192
- message = "Triggering: '#{name.inspect}' for #{args.first.inspect}"
191
+ elsif args.one?
192
+ "Triggering: '#{name.inspect}' for #{args.first.inspect}"
193
193
 
194
- else
195
- message = "Triggering: '#{name.inspect}'"
194
+ else
195
+ "Triggering: '#{name.inspect}'"
196
196
 
197
- end
197
+ end
198
198
 
199
199
  Vedeu.log(type: :event, message: message)
200
200
 
@@ -21,7 +21,7 @@ module Vedeu
21
21
  def reset!
22
22
  @events = new(Vedeu::Events::Collection)
23
23
  end
24
- alias_method :reset, :reset!
24
+ alias reset reset!
25
25
 
26
26
  end # Eigenclass
27
27
 
@@ -23,25 +23,25 @@ module Vedeu
23
23
  # @return [Fixnum] Returns the top coordinate (row/line start
24
24
  # position) of the interface.
25
25
  attr_reader :y
26
- alias_method :top, :y
26
+ alias top y
27
27
 
28
28
  # @!attribute [r] yn
29
29
  # @return [Fixnum] Returns the bottom coordinate (row/line end
30
30
  # position) of the interface.
31
31
  attr_reader :yn
32
- alias_method :bottom, :yn
32
+ alias bottom yn
33
33
 
34
34
  # @!attribute [r] x
35
35
  # @return [Fixnum] Returns the left coordinate (column/character
36
36
  # start position) of the interface.
37
37
  attr_reader :x
38
- alias_method :left, :x
38
+ alias left x
39
39
 
40
40
  # @!attribute [r] xn
41
41
  # @return [Fixnum] Returns the right coordinate (column/
42
42
  # character end position) of the interface.
43
43
  attr_reader :xn
44
- alias_method :right, :xn
44
+ alias right xn
45
45
 
46
46
  # @param attributes [Hash<Symbol => Boolean|Fixnum|Symbol>]
47
47
  # @option attributes horizontal_alignment [Symbol]
@@ -104,7 +104,7 @@ module Vedeu
104
104
  self.class == other.class && y == other.y && yn == other.yn &&
105
105
  x == other.x && xn == other.xn
106
106
  end
107
- alias_method :==, :eql?
107
+ alias == eql?
108
108
 
109
109
  # Returns the width of the interface determined by whether a
110
110
  # left, right, both or neither borders are shown.
@@ -93,7 +93,7 @@ module Vedeu
93
93
  # @!attribute [r] maximised
94
94
  # @return [Boolean]
95
95
  attr_reader :maximised
96
- alias_method :maximised?, :maximised
96
+ alias maximised? maximised
97
97
 
98
98
  private
99
99
 
@@ -175,7 +175,7 @@ module Vedeu
175
175
  def align_centre(width = nil)
176
176
  horizontal_alignment(:centre, width)
177
177
  end
178
- alias_method :align_center, :align_centre
178
+ alias align_center align_centre
179
179
 
180
180
  # Horizontally align the interface/view to the left.
181
181
  #
@@ -311,7 +311,7 @@ module Vedeu
311
311
  def height(value)
312
312
  model.height = proc { value }
313
313
  end
314
- alias_method :height=, :height
314
+ alias height= height
315
315
 
316
316
  # Returns the height in characters for the number of rows
317
317
  # specified.
@@ -345,7 +345,7 @@ module Vedeu
345
345
  def width(value)
346
346
  model.width = proc { value }
347
347
  end
348
- alias_method :width=, :width
348
+ alias width= width
349
349
 
350
350
  # Specify the starting x position (column) of the interface.
351
351
  #
@@ -366,7 +366,7 @@ module Vedeu
366
366
 
367
367
  model.x = value
368
368
  end
369
- alias_method :x=, :x
369
+ alias x= x
370
370
 
371
371
  # Specify the ending x position (column) of the interface.
372
372
  # This value will override `width`.
@@ -388,7 +388,7 @@ module Vedeu
388
388
 
389
389
  model.xn = value
390
390
  end
391
- alias_method :xn=, :xn
391
+ alias xn= xn
392
392
 
393
393
  # Specify the starting y position (row/line) of the interface.
394
394
  #
@@ -409,7 +409,7 @@ module Vedeu
409
409
 
410
410
  model.y = value
411
411
  end
412
- alias_method :y=, :y
412
+ alias y= y
413
413
 
414
414
  # Specify the ending y position (row/line) of the interface.
415
415
  # This value will override `height`.
@@ -431,7 +431,7 @@ module Vedeu
431
431
 
432
432
  model.yn = value
433
433
  end
434
- alias_method :yn=, :yn
434
+ alias yn= yn
435
435
 
436
436
  end # DSL
437
437
 
@@ -58,7 +58,7 @@ module Vedeu
58
58
  # @!attribute [rw] maximised
59
59
  # @return [Boolean]
60
60
  attr_accessor :maximised
61
- alias_method :maximised?, :maximised
61
+ alias maximised? maximised
62
62
 
63
63
  # @!attribute [w] width
64
64
  # @return [Fixnum]
@@ -145,7 +145,7 @@ module Vedeu
145
145
  def eql?(other)
146
146
  self.class == other.class && name == other.name
147
147
  end
148
- alias_method :==, :eql?
148
+ alias == eql?
149
149
 
150
150
  # Will maximise the named interface geometry. This means it will
151
151
  # occupy all of the available space on the terminal window.
@@ -14,12 +14,12 @@ module Vedeu
14
14
  # @!attribute [r] y
15
15
  # @return [Fixnum]
16
16
  attr_reader :y
17
- alias_method :first, :y
17
+ alias first y
18
18
 
19
19
  # @!attribute [r] x
20
20
  # @return [Fixnum]
21
21
  attr_reader :x
22
- alias_method :last, :x
22
+ alias last x
23
23
 
24
24
  # Convenience constructor for Vedeu::Geometries::Position.
25
25
  #
@@ -92,7 +92,7 @@ module Vedeu
92
92
  def eql?(other)
93
93
  self.class == other.class && x == other.x && y == other.y
94
94
  end
95
- alias_method :==, :eql?
95
+ alias == eql?
96
96
 
97
97
  # Return a tuple containing the y and x coordinates.
98
98
  #
@@ -114,10 +114,10 @@ module Vedeu
114
114
  position: {
115
115
  y: y,
116
116
  x: x,
117
- }
117
+ },
118
118
  }
119
119
  end
120
- alias_method :to_hash, :to_h
120
+ alias to_hash to_h
121
121
 
122
122
  # Return the escape sequence required to position the cursor at
123
123
  # a particular point on the screen. When passed a block, will do
@@ -133,7 +133,7 @@ module Vedeu
133
133
 
134
134
  sequence
135
135
  end
136
- alias_method :to_str, :to_s
136
+ alias to_str to_s
137
137
 
138
138
  # Increase y coordinate; moves down.
139
139
  #
@@ -21,8 +21,8 @@ module Vedeu
21
21
  def render(name)
22
22
  new(name).render
23
23
  end
24
- alias_method :clear_by_group, :render
25
- alias_method :by_group, :render
24
+ alias clear_by_group render
25
+ alias by_group render
26
26
 
27
27
  end # Eigenclass
28
28
 
@@ -89,7 +89,7 @@ module Vedeu
89
89
  self.class == other.class && name == other.name &&
90
90
  members == other.members
91
91
  end
92
- alias_method :==, :eql?
92
+ alias == eql?
93
93
 
94
94
  # Hide the named group of interfaces, or without a name, the
95
95
  # group of the currently focussed interface. Useful for hiding
@@ -138,7 +138,7 @@ module Vedeu
138
138
 
139
139
  Vedeu::Groups::Group.store(attrs)
140
140
  end
141
- alias_method :reset, :reset!
141
+ alias reset reset!
142
142
 
143
143
  # Show the named group of interfaces, or without a name, the
144
144
  # group of the currently focussed interface.
@@ -100,7 +100,7 @@ module Vedeu
100
100
  model.add(Vedeu::Input::Key.new(value, &block))
101
101
  end
102
102
  end
103
- alias_method :key=, :key
103
+ alias key= key
104
104
 
105
105
  end # DSL
106
106
 
@@ -12,7 +12,7 @@ module Vedeu
12
12
  # @!attribute [r] input
13
13
  # @return [String|Symbol] Returns the key defined.
14
14
  attr_reader :input
15
- alias_method :key, :input
15
+ alias key input
16
16
 
17
17
  # Returns a new instance of Vedeu::Input::Key.
18
18
  #
@@ -33,8 +33,8 @@ module Vedeu
33
33
  def output
34
34
  @output.call
35
35
  end
36
- alias_method :action, :output
37
- alias_method :press, :output
36
+ alias action output
37
+ alias press output
38
38
 
39
39
  end # Key
40
40
 
@@ -91,7 +91,7 @@ module Vedeu
91
91
  def key_defined?(named = name)
92
92
  keymap?(named) && keymap(named).key_defined?(key)
93
93
  end
94
- alias_method :registered?, :key_defined?
94
+ alias registered? key_defined?
95
95
 
96
96
  # Returns a boolean indicating that the key is not registered to
97
97
  # the current keymap, or the global keymap.
@@ -158,7 +158,7 @@ module Vedeu
158
158
  def name
159
159
  @name || Vedeu.focus
160
160
  end
161
- alias_method :interface, :name
161
+ alias interface name
162
162
 
163
163
  end # Mapper
164
164
 
@@ -69,7 +69,7 @@ module Vedeu
69
69
  # @return [Hash<Symbol => Symbol>]
70
70
  def defaults
71
71
  {
72
- mode: :cooked
72
+ mode: :cooked,
73
73
  }
74
74
  end
75
75
 
@@ -97,9 +97,7 @@ module Vedeu
97
97
  console.gets.chomp
98
98
 
99
99
  elsif raw?
100
- keys = Vedeu::Input::Raw.read
101
-
102
- Vedeu::Input::Translator.translate(keys)
100
+ Vedeu::Input::Translator.translate(Vedeu::Input::Raw.read)
103
101
 
104
102
  elsif fake?
105
103
  console.cooked do
@@ -9,6 +9,7 @@ module Vedeu
9
9
  module Store
10
10
 
11
11
  extend self
12
+ extend Vedeu::Repositories::Storage
12
13
 
13
14
  # {include:file:docs/dsl/by_method/add_command.md}
14
15
  # @param command [Symbol|String]
@@ -48,23 +49,6 @@ module Vedeu
48
49
  all_keypresses[-1]
49
50
  end
50
51
 
51
- # Remove all stored entries. Any commands or keypresses entered
52
- # before calling this method will be removed.
53
- #
54
- # @return [Hash<Symbol => Array<Symbol|String>>]
55
- def reset!
56
- @storage = in_memory
57
- end
58
- alias_method :reset, :reset!
59
-
60
- # Access all commands and keypresses stored.
61
- #
62
- # @return [Hash<Symbol => Array<Symbol|String>>]
63
- def storage
64
- @storage ||= in_memory
65
- end
66
- alias_method :all, :storage
67
-
68
52
  private
69
53
 
70
54
  # @return [Hash<Symbol => Array<Symbol|String>>]
@@ -38,7 +38,13 @@ module Vedeu
38
38
 
39
39
  end # Input
40
40
 
41
+ # Maps keypress escape sequences to symbols for special keys.
42
+ #
43
+ # @api private
44
+ # @return [Hash<String => Symbol>]
41
45
  KEY_TABLE = {
46
+ # "\u0020" => :ctrl_t, # duplicates spacebar
47
+ # "\u0009" => :ctrl_i, # duplicates tab
42
48
  "\u0001" => :ctrl_a,
43
49
  "\u0002" => :ctrl_b,
44
50
  "\u0003" => :ctrl_c,
@@ -49,8 +55,7 @@ module Vedeu
49
55
  "\u0006" => :ctrl_f,
50
56
  "\u0007" => :ctrl_g,
51
57
  "\u0008" => :ctrl_h,
52
- # "\u0009" => :ctrl_i, # duplicates tab
53
- "\u0010" => :ctrl_j, # produces "\n"
58
+ "\u0010" => :ctrl_j,
54
59
  "\u0011" => :ctrl_k,
55
60
  "\u0012" => :ctrl_l,
56
61
  "\u0013" => :ctrl_m,
@@ -61,17 +66,16 @@ module Vedeu
61
66
  "\u0018" => :ctrl_r,
62
67
  "\u2412" => :ctrl_r,
63
68
  "\u0019" => :ctrl_s,
64
- # "\u0020" => :ctrl_t, # duplicates spacebar
65
- "\u0021" => :ctrl_u,
66
- "\u0022" => :ctrl_v,
67
- "\u0023" => :ctrl_w,
68
- "\u0024" => :ctrl_x,
69
- "\u0025" => :ctrl_y,
70
- "\u0026" => :ctrl_z,
71
- "\eOP" => :f1,
72
- "\eOQ" => :f2,
73
- "\eOR" => :f3,
74
- "\eOS" => :f4,
69
+ %(\u0021) => :ctrl_u,
70
+ %(\u0022) => :ctrl_v,
71
+ %(\u0023) => :ctrl_w,
72
+ %(\u0024) => :ctrl_x,
73
+ %(\u0025) => :ctrl_y,
74
+ %(\u0026) => :ctrl_z,
75
+ "\eOP" => :f1,
76
+ "\eOQ" => :f2,
77
+ "\eOR" => :f3,
78
+ "\eOS" => :f4,
75
79
  "\e[15~" => :f5,
76
80
  "\e[17~" => :f6,
77
81
  "\e[18~" => :f7,
@@ -96,37 +100,37 @@ module Vedeu
96
100
  "\e[21;5~" => :ctrl_f10,
97
101
  "\e[23;5~" => :ctrl_f11,
98
102
  "\e[24;5~" => :ctrl_f12,
99
- "\e[B" => :down,
100
- "\u2193" => :down,
101
- "\e[D" => :left,
102
- "\u2190" => :left,
103
- "\e[C" => :right,
104
- "\u2192" => :right,
105
- "\e[A" => :up,
106
- "\u2191" => :up,
107
- "\u007F" => :backspace,
108
- "\u2408" => :backspace,
109
- "\u23CE" => :carriage_return,
110
- "\e[3~" => :delete,
111
- "\u232B" => :delete,
112
- "\e[F" => :end,
113
- "\eOF" => :end,
114
- "\r" => :enter,
115
- "\n" => :enter,
116
- "\e" => :escape,
117
- "\u238B" => :escape,
118
- "\e[H" => :home,
119
- "\eOH" => :home,
120
- "\e[2~" => :insert,
121
- "\u240A" => :line_feed,
122
- "\e[5~" => :page_up,
123
- "\e[6~" => :page_down,
124
- "\e[1;2R" => :pause_break,
125
- "\e[1;2P" => :print_screen,
126
- "\e[1;2Q" => :scroll_lock,
127
- "\e[Z" => :shift_tab,
128
- "\t" => :tab,
129
- "\u21B9" => :tab,
130
- }
103
+ "\e[B" => :down,
104
+ "\u2193" => :down,
105
+ "\e[D" => :left,
106
+ "\u2190" => :left,
107
+ "\e[C" => :right,
108
+ "\u2192" => :right,
109
+ "\e[A" => :up,
110
+ "\u2191" => :up,
111
+ "\u007F" => :backspace,
112
+ "\u2408" => :backspace,
113
+ "\u23CE" => :carriage_return,
114
+ "\e[3~" => :delete,
115
+ "\u232B" => :delete,
116
+ "\e[F" => :end,
117
+ "\eOF" => :end,
118
+ "\r" => :enter,
119
+ "\n" => :enter,
120
+ "\e" => :escape,
121
+ "\u238B" => :escape,
122
+ "\e[H" => :home,
123
+ "\eOH" => :home,
124
+ "\e[2~" => :insert,
125
+ "\u240A" => :line_feed,
126
+ "\e[5~" => :page_up,
127
+ "\e[6~" => :page_down,
128
+ "\e[1;2R" => :pause_break,
129
+ "\e[1;2P" => :print_screen,
130
+ "\e[1;2Q" => :scroll_lock,
131
+ "\e[Z" => :shift_tab,
132
+ "\t" => :tab,
133
+ "\u21B9" => :tab,
134
+ }.freeze
131
135
 
132
136
  end # Vedeu