vedeu 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.travis.yml +1 -1
- data/README.md +2 -6
- data/config/rubocop_enabled.yml +0 -6
- data/docs/dsl/by_method/clock_time.md +4 -1
- data/lib/vedeu/application/application_controller.rb +2 -2
- data/lib/vedeu/application/controller.rb +3 -3
- data/lib/vedeu/borders/border.rb +6 -6
- data/lib/vedeu/borders/dsl.rb +26 -26
- data/lib/vedeu/borders/refresh.rb +2 -2
- data/lib/vedeu/borders/title.rb +4 -4
- data/lib/vedeu/buffers/refresh.rb +8 -7
- data/lib/vedeu/buffers/terminal.rb +1 -1
- data/lib/vedeu/buffers/view.rb +2 -2
- data/lib/vedeu/cells/clear.rb +1 -1
- data/lib/vedeu/cells/cursor.rb +6 -6
- data/lib/vedeu/cells/empty.rb +2 -2
- data/lib/vedeu/cells/escape.rb +6 -6
- data/lib/vedeu/coercers/alignment.rb +1 -1
- data/lib/vedeu/coercers/colour_attributes.rb +8 -16
- data/lib/vedeu/colours/background.rb +4 -8
- data/lib/vedeu/colours/colour.rb +4 -4
- data/lib/vedeu/colours/foreground.rb +4 -8
- data/lib/vedeu/colours/repository.rb +1 -1
- data/lib/vedeu/colours/translator.rb +6 -6
- data/lib/vedeu/common.rb +1 -1
- data/lib/vedeu/configuration/api.rb +15 -15
- data/lib/vedeu/configuration/configuration.rb +8 -8
- data/lib/vedeu/cursors/coordinate.rb +4 -4
- data/lib/vedeu/cursors/cursor.rb +2 -2
- data/lib/vedeu/distributed/client.rb +2 -2
- data/lib/vedeu/distributed/server.rb +8 -10
- data/lib/vedeu/distributed/subprocess.rb +1 -1
- data/lib/vedeu/distributed/uri.rb +1 -1
- data/lib/vedeu/dsl/cursors.rb +2 -2
- data/lib/vedeu/dsl/elements.rb +5 -5
- data/lib/vedeu/dsl/helpers/align.rb +1 -1
- data/lib/vedeu/dsl/helpers/attributes.rb +1 -1
- data/lib/vedeu/dsl/presentation.rb +15 -15
- data/lib/vedeu/dsl/view.rb +1 -1
- data/lib/vedeu/dsl/views.rb +1 -1
- data/lib/vedeu/editor/cursor.rb +1 -1
- data/lib/vedeu/editor/line.rb +2 -2
- data/lib/vedeu/editor/lines.rb +2 -2
- data/lib/vedeu/esc/borders.rb +19 -19
- data/lib/vedeu/esc/colours.rb +1 -1
- data/lib/vedeu/events/aliases.rb +3 -15
- data/lib/vedeu/events/event.rb +14 -14
- data/lib/vedeu/events/repository.rb +1 -1
- data/lib/vedeu/geometries/area/area.rb +5 -5
- data/lib/vedeu/geometries/area/dimension.rb +1 -1
- data/lib/vedeu/geometries/dsl/dsl.rb +7 -7
- data/lib/vedeu/geometries/geometry.rb +2 -2
- data/lib/vedeu/geometries/position.rb +6 -6
- data/lib/vedeu/groups/clear.rb +2 -2
- data/lib/vedeu/groups/group.rb +2 -2
- data/lib/vedeu/input/dsl.rb +1 -1
- data/lib/vedeu/input/key.rb +3 -3
- data/lib/vedeu/input/mapper.rb +2 -2
- data/lib/vedeu/input/read.rb +2 -4
- data/lib/vedeu/input/store.rb +1 -17
- data/lib/vedeu/input/translator.rb +49 -45
- data/lib/vedeu/interfaces/clear.rb +3 -3
- data/lib/vedeu/interfaces/dsl.rb +4 -4
- data/lib/vedeu/interfaces/interface.rb +2 -2
- data/lib/vedeu/logging/clock_time.rb +3 -3
- data/lib/vedeu/logging/debug.rb +14 -6
- data/lib/vedeu/logging/log.rb +1 -1
- data/lib/vedeu/menus/dsl.rb +2 -2
- data/lib/vedeu/menus/menu.rb +9 -9
- data/lib/vedeu/models/focus.rb +11 -11
- data/lib/vedeu/models/page.rb +1 -1
- data/lib/vedeu/models/row.rb +1 -1
- data/lib/vedeu/models/toggleable.rb +7 -7
- data/lib/vedeu/null/generic.rb +29 -29
- data/lib/vedeu/output/compressor_cache.rb +1 -11
- data/lib/vedeu/output/viewport.rb +4 -12
- data/lib/vedeu/output/write.rb +3 -3
- data/lib/vedeu/plugins/plugin.rb +1 -1
- data/lib/vedeu/presentation/colour.rb +1 -1
- data/lib/vedeu/presentation/presentation.rb +1 -1
- data/lib/vedeu/presentation/style.rb +4 -4
- data/lib/vedeu/renderers/all.rb +1 -14
- data/lib/vedeu/renderers/options.rb +1 -1
- data/lib/vedeu/repositories/all.rb +1 -0
- data/lib/vedeu/repositories/assemblage.rb +1 -1
- data/lib/vedeu/repositories/collection.rb +4 -4
- data/lib/vedeu/repositories/registerable.rb +2 -2
- data/lib/vedeu/repositories/repositories.rb +1 -1
- data/lib/vedeu/repositories/repository.rb +3 -3
- data/lib/vedeu/repositories/storage.rb +38 -0
- data/lib/vedeu/repositories/store.rb +5 -22
- data/lib/vedeu/runtime/application.rb +1 -1
- data/lib/vedeu/runtime/flags.rb +3 -3
- data/lib/vedeu/runtime/router.rb +3 -18
- data/lib/vedeu/templating/helpers.rb +5 -3
- data/lib/vedeu/templating/view_template.rb +26 -18
- data/lib/vedeu/terminal/terminal.rb +5 -5
- data/lib/vedeu/version.rb +1 -1
- data/lib/vedeu/views/chars.rb +1 -1
- data/lib/vedeu/views/composition.rb +4 -4
- data/lib/vedeu/views/default_attributes.rb +2 -2
- data/lib/vedeu/views/line.rb +6 -6
- data/lib/vedeu/views/lines.rb +1 -1
- data/lib/vedeu/views/stream.rb +6 -6
- data/lib/vedeu/views/streams.rb +1 -1
- data/lib/vedeu/views/view.rb +4 -4
- data/test/lib/vedeu/borders/border_test.rb +1 -1
- data/test/lib/vedeu/borders/caption_test.rb +1 -1
- data/test/lib/vedeu/borders/dsl_test.rb +2 -3
- data/test/lib/vedeu/borders/refresh_test.rb +1 -1
- data/test/lib/vedeu/borders/title_test.rb +1 -1
- data/test/lib/vedeu/buffers/buffer_test.rb +7 -7
- data/test/lib/vedeu/buffers/refresh_test.rb +1 -1
- data/test/lib/vedeu/colours/background_test.rb +27 -0
- data/test/lib/vedeu/colours/foreground_test.rb +27 -0
- data/test/lib/vedeu/cursors/cursor_test.rb +3 -3
- data/test/lib/vedeu/cursors/move_test.rb +1 -1
- data/test/lib/vedeu/cursors/refresh_test.rb +1 -1
- data/test/lib/vedeu/cursors/reposition_test.rb +2 -2
- data/test/lib/vedeu/dsl/view_test.rb +6 -8
- data/test/lib/vedeu/editor/cropper_test.rb +1 -1
- data/test/lib/vedeu/editor/cursor_test.rb +1 -1
- data/test/lib/vedeu/editor/document_test.rb +1 -1
- data/test/lib/vedeu/editor/editor_test.rb +1 -1
- data/test/lib/vedeu/events/aliases_test.rb +0 -14
- data/test/lib/vedeu/geometries/area/area_test.rb +1 -1
- data/test/lib/vedeu/geometries/geometry_test.rb +1 -1
- data/test/lib/vedeu/geometries/move_test.rb +1 -1
- data/test/lib/vedeu/groups/clear_test.rb +1 -1
- data/test/lib/vedeu/groups/dsl_test.rb +1 -1
- data/test/lib/vedeu/groups/group_test.rb +1 -1
- data/test/lib/vedeu/groups/refresh_test.rb +1 -1
- data/test/lib/vedeu/input/capture_test.rb +2 -2
- data/test/lib/vedeu/input/store_test.rb +0 -34
- data/test/lib/vedeu/interfaces/clear_test.rb +1 -1
- data/test/lib/vedeu/interfaces/dsl_test.rb +4 -4
- data/test/lib/vedeu/interfaces/interface_test.rb +1 -1
- data/test/lib/vedeu/menus/dsl_test.rb +1 -1
- data/test/lib/vedeu/null/generic_test.rb +1 -1
- data/test/lib/vedeu/output/compressor_cache_test.rb +0 -33
- data/test/lib/vedeu/renderers/all_test.rb +0 -8
- data/test/lib/vedeu/repositories/repository_test.rb +2 -2
- data/test/lib/vedeu/repositories/storage_test.rb +74 -0
- data/test/lib/vedeu/repositories/store_test.rb +10 -28
- data/test/lib/vedeu/runtime/router_test.rb +0 -8
- data/test/lib/vedeu/views/default_attributes_test.rb +5 -5
- data/test/lib/vedeu/views/view_test.rb +5 -2
- data/test/test_helper.rb +1 -1
- data/vedeu.gemspec +1 -1
- metadata +7 -4
data/lib/vedeu/events/event.rb
CHANGED
@@ -90,8 +90,8 @@ module Vedeu
|
|
90
90
|
|
91
91
|
new(name, block, options).bind
|
92
92
|
end
|
93
|
-
|
94
|
-
|
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
|
-
|
141
|
+
new_collection = if repository.registered?(name)
|
142
|
+
repository.find(name).add(self)
|
143
143
|
|
144
|
-
|
145
|
-
|
144
|
+
else
|
145
|
+
Vedeu::Events::Collection.new([self], nil, name)
|
146
146
|
|
147
|
-
|
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
|
-
|
188
|
+
message = if args.size > 1
|
189
|
+
"Triggering: '#{name.inspect}' with #{args.inspect}"
|
190
190
|
|
191
|
-
|
192
|
-
|
191
|
+
elsif args.one?
|
192
|
+
"Triggering: '#{name.inspect}' for #{args.first.inspect}"
|
193
193
|
|
194
|
-
|
195
|
-
|
194
|
+
else
|
195
|
+
"Triggering: '#{name.inspect}'"
|
196
196
|
|
197
|
-
|
197
|
+
end
|
198
198
|
|
199
199
|
Vedeu.log(type: :event, message: message)
|
200
200
|
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
@@ -175,7 +175,7 @@ module Vedeu
|
|
175
175
|
def align_centre(width = nil)
|
176
176
|
horizontal_alignment(:centre, width)
|
177
177
|
end
|
178
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
17
|
+
alias first y
|
18
18
|
|
19
19
|
# @!attribute [r] x
|
20
20
|
# @return [Fixnum]
|
21
21
|
attr_reader :x
|
22
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
136
|
+
alias to_str to_s
|
137
137
|
|
138
138
|
# Increase y coordinate; moves down.
|
139
139
|
#
|
data/lib/vedeu/groups/clear.rb
CHANGED
data/lib/vedeu/groups/group.rb
CHANGED
@@ -89,7 +89,7 @@ module Vedeu
|
|
89
89
|
self.class == other.class && name == other.name &&
|
90
90
|
members == other.members
|
91
91
|
end
|
92
|
-
|
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
|
-
|
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.
|
data/lib/vedeu/input/dsl.rb
CHANGED
data/lib/vedeu/input/key.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
37
|
-
|
36
|
+
alias action output
|
37
|
+
alias press output
|
38
38
|
|
39
39
|
end # Key
|
40
40
|
|
data/lib/vedeu/input/mapper.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
161
|
+
alias interface name
|
162
162
|
|
163
163
|
end # Mapper
|
164
164
|
|
data/lib/vedeu/input/read.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/vedeu/input/store.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
"\
|
71
|
-
"\
|
72
|
-
"\
|
73
|
-
"\
|
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"
|
100
|
-
"\u2193"
|
101
|
-
"\e[D"
|
102
|
-
"\u2190"
|
103
|
-
"\e[C"
|
104
|
-
"\u2192"
|
105
|
-
"\e[A"
|
106
|
-
"\u2191"
|
107
|
-
"\u007F"
|
108
|
-
"\u2408"
|
109
|
-
"\u23CE"
|
110
|
-
"\e[3~"
|
111
|
-
"\u232B"
|
112
|
-
"\e[F"
|
113
|
-
"\eOF"
|
114
|
-
"\r"
|
115
|
-
"\n"
|
116
|
-
"\e"
|
117
|
-
"\u238B"
|
118
|
-
"\e[H"
|
119
|
-
"\eOH"
|
120
|
-
"\e[2~"
|
121
|
-
"\u240A"
|
122
|
-
"\e[5~"
|
123
|
-
"\e[6~"
|
124
|
-
"\e[1;2R"
|
125
|
-
"\e[1;2P"
|
126
|
-
"\e[1;2Q"
|
127
|
-
"\e[Z"
|
128
|
-
"\t"
|
129
|
-
"\u21B9"
|
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
|