vedeu 0.6.52 → 0.6.53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/input.md +28 -0
- data/lib/vedeu/editor/editor.rb +2 -0
- data/lib/vedeu/input/mapper.rb +2 -0
- data/lib/vedeu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 851012d18b1c012db01d31e28a898832ef40d051
|
4
|
+
data.tar.gz: 4e0d8666b35747f42d090b35fdcd24ae1651b993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4a99e9cca93e0bcae05902b107e90e1d774367000711e4e990afaf2e87f640d67ccf781ab46fc1750a992522cb91b8e3953a4620934bbf97c5ab09e8cd3f8ed
|
7
|
+
data.tar.gz: 0bda0129905a48b8621361357ae495f8acab349dbdfce41ef962ed20887c69766284ef030d940f9cd47515610dac58dd768ce1b8c2bb12fab29a570dbe892667
|
data/docs/input.md
CHANGED
@@ -96,3 +96,31 @@ given, that mode will be activated instead.
|
|
96
96
|
|
97
97
|
Vedeu.trigger(:_mode_switch_, mode) # Valid values for mode are
|
98
98
|
# :raw, :cooked or :fake
|
99
|
+
|
100
|
+
## Accessing Input
|
101
|
+
|
102
|
+
Accessing the input can be achieved in the following ways:
|
103
|
+
|
104
|
+
- Via a keymap: Vedeu will interpret the input and trigger events or
|
105
|
+
call methods based on the input received.
|
106
|
+
|
107
|
+
- Via API calls: You can access that which is entered into the client
|
108
|
+
application with the following methods:
|
109
|
+
|
110
|
+
Vedeu.all_commands # => Returns an array of all the commands
|
111
|
+
# entered.
|
112
|
+
Vedeu.last_command # => Returns the last command entered.
|
113
|
+
Vedeu.all_keypresses # => Returns all the individual
|
114
|
+
# keypresses entered as an array.
|
115
|
+
Vedeu.last_keypress # => Returns the last keypress entered.
|
116
|
+
|
117
|
+
- Via events: You can access that which is entered by binding to
|
118
|
+
events which Vedeu will trigger as input is received:
|
119
|
+
|
120
|
+
Vedeu.bind(:key) do
|
121
|
+
# ... do something with the key
|
122
|
+
end
|
123
|
+
|
124
|
+
Vedeu.bind(:command) do
|
125
|
+
# ... do something with the command
|
126
|
+
end
|
data/lib/vedeu/editor/editor.rb
CHANGED
data/lib/vedeu/input/mapper.rb
CHANGED
data/lib/vedeu/version.rb
CHANGED