vedeu 0.6.52 → 0.6.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 134542edb6745534c69b060678db4f11bd0e5b47
4
- data.tar.gz: c679c95b4f54b95a03ec19d6ed011d2590954905
3
+ metadata.gz: 851012d18b1c012db01d31e28a898832ef40d051
4
+ data.tar.gz: 4e0d8666b35747f42d090b35fdcd24ae1651b993
5
5
  SHA512:
6
- metadata.gz: e63c021516235bf2d2567ed1416127b5ef882167d8811c5a7fa107591c87f596431bfb48a47aed11b394efc1dab68f29eeb671c2820a10a410741741ef536f6f
7
- data.tar.gz: 1c0d40b4476b35b6cf4cd33161fd9b878da4efe5e8b8c02dc1d169d18adb877dc628c12276fde234cbbca3235eaebc1757c471d2c219c72994a6544455262da6
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
@@ -91,6 +91,8 @@ module Vedeu
91
91
 
92
92
  # See {file:docs/events/system.md#\_editor_}
93
93
  Vedeu.bind(:_editor_) do |key|
94
+ Vedeu.trigger(:key, key)
95
+
94
96
  Vedeu::Editor::Editor.keypress(name: Vedeu.focus, input: key)
95
97
  end
96
98
 
@@ -157,6 +157,8 @@ module Vedeu
157
157
 
158
158
  # See {file:docs/events/system.md#\_keypress_}
159
159
  Vedeu.bind(:_keypress_) do |key, name|
160
+ Vedeu.trigger(:key, key)
161
+
160
162
  Vedeu.add_keypress(key)
161
163
 
162
164
  Vedeu.keypress(key, name)
data/lib/vedeu/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Vedeu
2
2
 
3
3
  # The current version of Vedeu.
4
- VERSION = '0.6.52'.freeze
4
+ VERSION = '0.6.53'.freeze
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vedeu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.52
4
+ version: 0.6.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Laking