FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
event.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#include <map> // for map
5#include <string>
6#include <utility> // for move
7
9#include "ftxui/component/mouse.hpp" // for Mouse
10#include "ftxui/screen/string.hpp" // for to_wstring
11
12// シャドウ変数の警告を無効にします。すべてのコンパイラに対して。実際、アルファベットのすべての文字に対して静的イベントがあります。
13#ifdef __clang__
14#pragma clang diagnostic ignored "-Wshadow"
15#elif __GNUC__
16#pragma GCC diagnostic ignored "-Wshadow"
17#elif defined(_MSC_VER)
18#pragma warning(disable : 6244)
19#pragma warning(disable : 6246)
20#endif
21
22namespace ftxui {
23
24/// @brief 入力された文字に対応するイベント。
25/// @param input ユーザーが入力した文字。
26// static
27Event Event::Character(std::string input) {
28 Event event;
29 event.input_ = std::move(input);
30 event.type_ = Type::Character;
31 return event;
32}
33
34/// @brief 入力された文字に対応するイベント。
35/// @param c ユーザーが入力した文字。
36// static
37Event Event::Character(char c) {
38 return Event::Character(std::string{c});
39}
40
41/// @brief 入力された文字に対応するイベント。
42/// @param c ユーザーが入力した文字。
43// static
44Event Event::Character(wchar_t c) {
45 return Event::Character(to_string(std::wstring{c}));
46}
47
48/// @brief 入力された文字に対応するイベント。
49/// @param input 端末から送信される文字のシーケンス。
50/// @param mouse マウスの状態。
51// static
52Event Event::Mouse(std::string input, struct Mouse mouse) {
53 Event event;
54 event.input_ = std::move(input);
55 event.type_ = Type::Mouse;
56 event.data_.mouse = mouse; // NOLINT
57 return event;
58}
59
60/// @brief 端末のDCS(デバイス制御文字列)に対応するイベント。
61// static
62Event Event::CursorShape(std::string input, int shape) {
63 Event event;
64 event.input_ = std::move(input);
65 event.type_ = Type::CursorShape;
66 event.data_.cursor_shape = shape; // NOLINT
67 return event;
68}
69
70/// @brief ライブラリのユーザーによって意味が定義されるカスタムイベント。
71/// @param input 開発者によって定義された任意の文字シーケンス。
72// static
73Event Event::Special(std::string input) {
74 Event event;
75 event.input_ = std::move(input);
76 return event;
77}
78
79/// @internal
80// static
81Event Event::CursorPosition(std::string input, int x, int y) {
82 Event event;
83 event.input_ = std::move(input);
84 event.type_ = Type::CursorPosition;
85 event.data_.cursor = {x, y}; // NOLINT
86 return event;
87}
88
89/// @brief イベントの文字列表現を返します。
90std::string Event::DebugString() const {
91 static std::map<Event, const char*> event_to_string = {
92 // --- 矢印 ---
93 {Event::ArrowLeft, "Event::ArrowLeft"},
94 {Event::ArrowRight, "Event::ArrowRight"},
95 {Event::ArrowUp, "Event::ArrowUp"},
96 {Event::ArrowDown, "Event::ArrowDown"},
97
98 // --- 矢印Ctrl ---
99 {Event::ArrowLeftCtrl, "Event::ArrowLeftCtrl"},
100 {Event::ArrowRightCtrl, "Event::ArrowRightCtrl"},
101 {Event::ArrowUpCtrl, "Event::ArrowUpCtrl"},
102 {Event::ArrowDownCtrl, "Event::ArrowDownCtrl"},
103
104 // --- その他 ---
105 {Event::Backspace, "Event::Backspace"},
106 {Event::Delete, "Event::Delete"},
107 {Event::Escape, "Event::Escape"},
108 {Event::Return, "Event::Return"},
109 {Event::Tab, "Event::Tab"},
110 {Event::TabReverse, "Event::TabReverse"},
111
112 // --- ファンクションキー ---
113 {Event::F1, "Event::F1"},
114 {Event::F2, "Event::F2"},
115 {Event::F3, "Event::F3"},
116 {Event::F4, "Event::F4"},
117 {Event::F5, "Event::F5"},
118 {Event::F6, "Event::F6"},
119 {Event::F7, "Event::F7"},
120 {Event::F8, "Event::F8"},
121 {Event::F9, "Event::F9"},
122 {Event::F10, "Event::F10"},
123 {Event::F11, "Event::F11"},
124 {Event::F12, "Event::F12"},
125
126 // --- ナビゲーションキー ---
127 {Event::Insert, "Event::Insert"},
128 {Event::Home, "Event::Home"},
129 {Event::End, "Event::End"},
130 {Event::PageUp, "Event::PageUp"},
131 {Event::PageDown, "Event::PageDown"},
132
133 // --- コントロールキー ---
134 {Event::CtrlA, "Event::CtrlA"},
135 {Event::CtrlB, "Event::CtrlB"},
136 {Event::CtrlC, "Event::CtrlC"},
137 {Event::CtrlD, "Event::CtrlD"},
138 {Event::CtrlE, "Event::CtrlE"},
139 {Event::CtrlF, "Event::CtrlF"},
140 {Event::CtrlG, "Event::CtrlG"},
141 {Event::CtrlH, "Event::CtrlH"},
142 {Event::CtrlI, "Event::CtrlI"},
143 {Event::CtrlJ, "Event::CtrlJ"},
144 {Event::CtrlK, "Event::CtrlK"},
145 {Event::CtrlL, "Event::CtrlL"},
146 {Event::CtrlM, "Event::CtrlM"},
147 {Event::CtrlN, "Event::CtrlN"},
148 {Event::CtrlO, "Event::CtrlO"},
149 {Event::CtrlP, "Event::CtrlP"},
150 {Event::CtrlQ, "Event::CtrlQ"},
151 {Event::CtrlR, "Event::CtrlR"},
152 {Event::CtrlS, "Event::CtrlS"},
153 {Event::CtrlT, "Event::CtrlT"},
154 {Event::CtrlU, "Event::CtrlU"},
155 {Event::CtrlV, "Event::CtrlV"},
156 {Event::CtrlW, "Event::CtrlW"},
157 {Event::CtrlX, "Event::CtrlX"},
158 {Event::CtrlY, "Event::CtrlY"},
159 {Event::CtrlZ, "Event::CtrlZ"},
160
161 // --- Altキー ---
162 {Event::AltA, "Event::AltA"},
163 {Event::AltB, "Event::AltB"},
164 {Event::AltC, "Event::AltC"},
165 {Event::AltD, "Event::AltD"},
166 {Event::AltE, "Event::AltE"},
167 {Event::AltF, "Event::AltF"},
168 {Event::AltG, "Event::AltG"},
169 {Event::AltH, "Event::AltH"},
170 {Event::AltI, "Event::AltI"},
171 {Event::AltJ, "Event::AltJ"},
172 {Event::AltK, "Event::AltK"},
173 {Event::AltL, "Event::AltL"},
174 {Event::AltM, "Event::AltM"},
175 {Event::AltN, "Event::AltN"},
176 {Event::AltO, "Event::AltO"},
177 {Event::AltP, "Event::AltP"},
178 {Event::AltQ, "Event::AltQ"},
179 {Event::AltR, "Event::AltR"},
180 {Event::AltS, "Event::AltS"},
181 {Event::AltT, "Event::AltT"},
182 {Event::AltU, "Event::AltU"},
183 {Event::AltV, "Event::AltV"},
184 {Event::AltW, "Event::AltW"},
185 {Event::AltX, "Event::AltX"},
186 {Event::AltY, "Event::AltY"},
187 {Event::AltZ, "Event::AltZ"},
188
189 // --- CtrlAltキー ---
190 {Event::CtrlAltA, "Event::CtrlAltA"},
191 {Event::CtrlAltB, "Event::CtrlAltB"},
192 {Event::CtrlAltC, "Event::CtrlAltC"},
193 {Event::CtrlAltD, "Event::CtrlAltD"},
194 {Event::CtrlAltE, "Event::CtrlAltE"},
195 {Event::CtrlAltF, "Event::CtrlAltF"},
196 {Event::CtrlAltG, "Event::CtrlAltG"},
197 {Event::CtrlAltH, "Event::CtrlAltH"},
198 {Event::CtrlAltI, "Event::CtrlAltI"},
199 {Event::CtrlAltJ, "Event::CtrlAltJ"},
200 {Event::CtrlAltK, "Event::CtrlAltK"},
201 {Event::CtrlAltL, "Event::CtrlAltL"},
202 {Event::CtrlAltM, "Event::CtrlAltM"},
203 {Event::CtrlAltN, "Event::CtrlAltN"},
204 {Event::CtrlAltO, "Event::CtrlAltO"},
205 {Event::CtrlAltP, "Event::CtrlAltP"},
206 {Event::CtrlAltQ, "Event::CtrlAltQ"},
207 {Event::CtrlAltR, "Event::CtrlAltR"},
208 {Event::CtrlAltS, "Event::CtrlAltS"},
209 {Event::CtrlAltT, "Event::CtrlAltT"},
210 {Event::CtrlAltU, "Event::CtrlAltU"},
211 {Event::CtrlAltV, "Event::CtrlAltV"},
212 {Event::CtrlAltW, "Event::CtrlAltW"},
213 {Event::CtrlAltX, "Event::CtrlAltX"},
214 {Event::CtrlAltY, "Event::CtrlAltY"},
215 {Event::CtrlAltZ, "Event::CtrlAltZ"},
216
217 // --- カスタム ---
218 {Event::Custom, "Event::Custom"},
219 };
220
221 static std::map<Mouse::Button, const char*> mouse_button_string = {
222 {Mouse::Button::Left, ".button = Mouse::Left"},
223 {Mouse::Button::Middle, ".button = Mouse::Middle"},
224 {Mouse::Button::Right, ".button = Mouse::Right"},
225 {Mouse::Button::WheelUp, ".button = Mouse::WheelUp"},
226 {Mouse::Button::WheelDown, ".button = Mouse::WheelDown"},
227 {Mouse::Button::None, ".button = Mouse::None"},
228 {Mouse::Button::WheelLeft, ".button = Mouse::WheelLeft"},
229 {Mouse::Button::WheelRight, ".button = Mouse::WheelRight"},
230 };
231
232 static std::map<Mouse::Motion, const char*> mouse_motion_string = {
233 {Mouse::Motion::Pressed, ".motion = Mouse::Pressed"},
234 {Mouse::Motion::Released, ".motion = Mouse::Released"},
235 {Mouse::Motion::Moved, ".motion = Mouse::Moved"},
236 };
237
238 switch (type_) {
239 case Type::Character: {
240 return "Event::Character(\"" + input_ + "\")";
241 }
242 case Type::Mouse: {
243 std::string out = "Event::Mouse(\"...\", Mouse{";
244 out += std::string(mouse_button_string[data_.mouse.button]);
245 out += ", ";
246 out += std::string(mouse_motion_string[data_.mouse.motion]);
247 out += ", ";
248 if (data_.mouse.shift) {
249 out += ".shift = true, ";
250 }
251 if (data_.mouse.meta) {
252 out += ".meta = true, ";
253 }
254 if (data_.mouse.control) {
255 out += ".control = true, ";
256 }
257 out += ".x = " + std::to_string(data_.mouse.x);
258 out += ", ";
259 out += ".y = " + std::to_string(data_.mouse.y);
260 out += "})";
261 return out;
262 }
263 case Type::CursorShape:
264 return "Event::CursorShape(" + input_ + ", " +
265 std::to_string(data_.cursor_shape) + ")";
266 case Type::CursorPosition:
267 return "Event::CursorPosition(" + input_ + ", " +
268 std::to_string(data_.cursor.x) + ", " +
269 std::to_string(data_.cursor.y) + ")";
270 default: {
271 auto event_it = event_to_string.find(*this);
272 if (event_it != event_to_string.end()) {
273 return event_it->second;
274 }
275
276 return "";
277 }
278 }
279 return "";
280}
281
282// clang-format off
283// NOLINTBEGIN
284
285// --- 矢印 ---
286const Event Event::ArrowLeft = Event::Special("\x1B[D");
287const Event Event::ArrowRight = Event::Special("\x1B[C");
288const Event Event::ArrowUp = Event::Special("\x1B[A");
289const Event Event::ArrowDown = Event::Special("\x1B[B");
290const Event Event::ArrowLeftCtrl = Event::Special("\x1B[1;5D");
291const Event Event::ArrowRightCtrl = Event::Special("\x1B[1;5C");
292const Event Event::ArrowUpCtrl = Event::Special("\x1B[1;5A");
293const Event Event::ArrowDownCtrl = Event::Special("\x1B[1;5B");
295const Event Event::Delete = Event::Special("\x1B[3~");
296const Event Event::Escape = Event::Special("\x1B");
297const Event Event::Return = Event::Special({10});
298const Event Event::Tab = Event::Special({9});
299const Event Event::TabReverse = Event::Special({27, 91, 90});
300
301// https://invisible-island.net/xterm/xterm-function-keys.html を参照してください。
302// xterm-new / vterm-xf86-v4 / mgt / screen に従います。
303const Event Event::F1 = Event::Special("\x1BOP");
304const Event Event::F2 = Event::Special("\x1BOQ");
305const Event Event::F3 = Event::Special("\x1BOR");
306const Event Event::F4 = Event::Special("\x1BOS");
307const Event Event::F5 = Event::Special("\x1B[15~");
308const Event Event::F6 = Event::Special("\x1B[17~");
309const Event Event::F7 = Event::Special("\x1B[18~");
310const Event Event::F8 = Event::Special("\x1B[19~");
311const Event Event::F9 = Event::Special("\x1B[20~");
312const Event Event::F10 = Event::Special("\x1B[21~");
313const Event Event::F11 = Event::Special("\x1B[23~");
314const Event Event::F12 = Event::Special("\x1B[24~");
315
316const Event Event::Insert = Event::Special("\x1B[2~");
317const Event Event::Home = Event::Special({27, 91, 72});
318const Event Event::End = Event::Special({27, 91, 70});
319const Event Event::PageUp = Event::Special({27, 91, 53, 126});
320const Event Event::PageDown = Event::Special({27, 91, 54, 126});
321const Event Event::Custom = Event::Special({0});
322
323const Event Event::a = Event::Character("a");
324const Event Event::b = Event::Character("b");
325const Event Event::c = Event::Character("c");
326const Event Event::d = Event::Character("d");
327const Event Event::e = Event::Character("e");
328const Event Event::f = Event::Character("f");
329const Event Event::g = Event::Character("g");
330const Event Event::h = Event::Character("h");
331const Event Event::i = Event::Character("i");
332const Event Event::j = Event::Character("j");
333const Event Event::k = Event::Character("k");
334const Event Event::l = Event::Character("l");
335const Event Event::m = Event::Character("m");
336const Event Event::n = Event::Character("n");
337const Event Event::o = Event::Character("o");
338const Event Event::p = Event::Character("p");
339const Event Event::q = Event::Character("q");
340const Event Event::r = Event::Character("r");
341const Event Event::s = Event::Character("s");
342const Event Event::t = Event::Character("t");
343const Event Event::u = Event::Character("u");
344const Event Event::v = Event::Character("v");
345const Event Event::w = Event::Character("w");
346const Event Event::x = Event::Character("x");
347const Event Event::y = Event::Character("y");
348const Event Event::z = Event::Character("z");
349
350const Event Event::A = Event::Character("A");
351const Event Event::B = Event::Character("B");
352const Event Event::C = Event::Character("C");
353const Event Event::D = Event::Character("D");
354const Event Event::E = Event::Character("E");
355const Event Event::F = Event::Character("F");
356const Event Event::G = Event::Character("G");
357const Event Event::H = Event::Character("H");
358const Event Event::I = Event::Character("I");
359const Event Event::J = Event::Character("J");
360const Event Event::K = Event::Character("K");
361const Event Event::L = Event::Character("L");
362const Event Event::M = Event::Character("M");
363const Event Event::N = Event::Character("N");
364const Event Event::O = Event::Character("O");
365const Event Event::P = Event::Character("P");
366const Event Event::Q = Event::Character("Q");
367const Event Event::R = Event::Character("R");
368const Event Event::S = Event::Character("S");
369const Event Event::T = Event::Character("T");
370const Event Event::U = Event::Character("U");
371const Event Event::V = Event::Character("V");
372const Event Event::W = Event::Character("W");
373const Event Event::X = Event::Character("X");
374const Event Event::Y = Event::Character("Y");
375const Event Event::Z = Event::Character("Z");
376
377const Event Event::CtrlA = Event::Special("\x01");
378const Event Event::CtrlB = Event::Special("\x02");
379const Event Event::CtrlC = Event::Special("\x03");
380const Event Event::CtrlD = Event::Special("\x04");
381const Event Event::CtrlE = Event::Special("\x05");
382const Event Event::CtrlF = Event::Special("\x06");
383const Event Event::CtrlG = Event::Special("\x07");
384const Event Event::CtrlH = Event::Special("\x08");
385const Event Event::CtrlI = Event::Special("\x09");
386const Event Event::CtrlJ = Event::Special("\x0a");
387const Event Event::CtrlK = Event::Special("\x0b");
388const Event Event::CtrlL = Event::Special("\x0c");
389const Event Event::CtrlM = Event::Special("\x0d");
390const Event Event::CtrlN = Event::Special("\x0e");
391const Event Event::CtrlO = Event::Special("\x0f");
392const Event Event::CtrlP = Event::Special("\x10");
393const Event Event::CtrlQ = Event::Special("\x11");
394const Event Event::CtrlR = Event::Special("\x12");
395const Event Event::CtrlS = Event::Special("\x13");
396const Event Event::CtrlT = Event::Special("\x14");
397const Event Event::CtrlU = Event::Special("\x15");
398const Event Event::CtrlV = Event::Special("\x16");
399const Event Event::CtrlW = Event::Special("\x17");
400const Event Event::CtrlX = Event::Special("\x18");
401const Event Event::CtrlY = Event::Special("\x19");
402const Event Event::CtrlZ = Event::Special("\x1a");
403
404const Event Event::AltA = Event::Special("\x1b""a");
405const Event Event::AltB = Event::Special("\x1b""b");
406const Event Event::AltC = Event::Special("\x1b""c");
407const Event Event::AltD = Event::Special("\x1b""d");
408const Event Event::AltE = Event::Special("\x1b""e");
409const Event Event::AltF = Event::Special("\x1b""f");
410const Event Event::AltG = Event::Special("\x1b""g");
411const Event Event::AltH = Event::Special("\x1b""h");
412const Event Event::AltI = Event::Special("\x1b""i");
413const Event Event::AltJ = Event::Special("\x1b""j");
414const Event Event::AltK = Event::Special("\x1b""k");
415const Event Event::AltL = Event::Special("\x1b""l");
416const Event Event::AltM = Event::Special("\x1b""m");
417const Event Event::AltN = Event::Special("\x1b""n");
418const Event Event::AltO = Event::Special("\x1b""o");
419const Event Event::AltP = Event::Special("\x1b""p");
420const Event Event::AltQ = Event::Special("\x1b""q");
421const Event Event::AltR = Event::Special("\x1b""r");
422const Event Event::AltS = Event::Special("\x1b""s");
423const Event Event::AltT = Event::Special("\x1b""t");
424const Event Event::AltU = Event::Special("\x1b""u");
425const Event Event::AltV = Event::Special("\x1b""v");
426const Event Event::AltW = Event::Special("\x1b""w");
427const Event Event::AltX = Event::Special("\x1b""x");
428const Event Event::AltY = Event::Special("\x1b""y");
429const Event Event::AltZ = Event::Special("\x1b""z");
430
431const Event Event::CtrlAltA = Event::Special("\x1b\x01");
432const Event Event::CtrlAltB = Event::Special("\x1b\x02");
433const Event Event::CtrlAltC = Event::Special("\x1b\x03");
434const Event Event::CtrlAltD = Event::Special("\x1b\x04");
435const Event Event::CtrlAltE = Event::Special("\x1b\x05");
436const Event Event::CtrlAltF = Event::Special("\x1b\x06");
437const Event Event::CtrlAltG = Event::Special("\x1b\x07");
438const Event Event::CtrlAltH = Event::Special("\x1b\x08");
439const Event Event::CtrlAltI = Event::Special("\x1b\x09");
440const Event Event::CtrlAltJ = Event::Special("\x1b\x0a");
441const Event Event::CtrlAltK = Event::Special("\x1b\x0b");
442const Event Event::CtrlAltL = Event::Special("\x1b\x0c");
443const Event Event::CtrlAltM = Event::Special("\x1b\x0d");
444const Event Event::CtrlAltN = Event::Special("\x1b\x0e");
445const Event Event::CtrlAltO = Event::Special("\x1b\x0f");
446const Event Event::CtrlAltP = Event::Special("\x1b\x10");
447const Event Event::CtrlAltQ = Event::Special("\x1b\x11");
448const Event Event::CtrlAltR = Event::Special("\x1b\x12");
449const Event Event::CtrlAltS = Event::Special("\x1b\x13");
450const Event Event::CtrlAltT = Event::Special("\x1b\x14");
451const Event Event::CtrlAltU = Event::Special("\x1b\x15");
452const Event Event::CtrlAltV = Event::Special("\x1b\x16");
453const Event Event::CtrlAltW = Event::Special("\x1b\x17");
454const Event Event::CtrlAltX = Event::Special("\x1b\x18");
455const Event Event::CtrlAltY = Event::Special("\x1b\x19");
456const Event Event::CtrlAltZ = Event::Special("\x1b\x1a");
457
458// NOLINTEND
459// clang-format on
460
461} // namespace ftxui
static const Event TabReverse
Definition event.hpp:55
static const Event j
Definition event.hpp:77
static const Event CtrlC
Definition event.hpp:70
@ WheelRight
対応しているターミナルのみ。
Definition mouse.hpp:20
static const Event CtrlP
Definition event.hpp:83
static const Event CtrlV
Definition event.hpp:89
static const Event ArrowLeftCtrl
Definition event.hpp:44
static const Event CtrlL
Definition event.hpp:79
static const Event AltT
Definition event.hpp:87
static const Event w
Definition event.hpp:90
static const Event CtrlAltX
Definition event.hpp:91
static const Event D
Definition event.hpp:71
static const Event CtrlAltN
Definition event.hpp:81
static const Event a
Definition event.hpp:68
static const Event AltH
Definition event.hpp:75
static const Event AltF
Definition event.hpp:73
static const Event K
Definition event.hpp:78
static const Event T
Definition event.hpp:87
static const Event CtrlAltC
Definition event.hpp:70
static const Event X
Definition event.hpp:91
static const Event CtrlE
Definition event.hpp:72
static const Event Q
Definition event.hpp:84
static const Event u
Definition event.hpp:88
static const Event PageUp
Definition event.hpp:61
static const Event h
Definition event.hpp:75
static const Event CtrlAltF
Definition event.hpp:73
static const Event CtrlZ
Definition event.hpp:93
static const Event J
Definition event.hpp:77
static const Event CtrlU
Definition event.hpp:88
static const Event AltQ
Definition event.hpp:84
static const Event b
Definition event.hpp:69
static const Event Escape
Definition event.hpp:53
static const Event AltY
Definition event.hpp:92
static const Event CtrlAltI
Definition event.hpp:76
static const Event AltL
Definition event.hpp:79
static const Event AltW
Definition event.hpp:90
static const Event F12
Definition event.hpp:65
static const Event E
Definition event.hpp:72
static const Event m
Definition event.hpp:80
static const Event N
Definition event.hpp:81
static const Event CtrlAltP
Definition event.hpp:83
static const Event CtrlAltE
Definition event.hpp:72
static const Event F5
Definition event.hpp:65
static const Event CtrlF
Definition event.hpp:73
static const Event F3
Definition event.hpp:65
static const Event CtrlAltJ
Definition event.hpp:77
static const Event z
Definition event.hpp:93
static const Event AltK
Definition event.hpp:78
static const Event B
Definition event.hpp:69
static const Event H
Definition event.hpp:75
static const Event CtrlX
Definition event.hpp:91
static const Event F9
Definition event.hpp:65
static const Event AltC
Definition event.hpp:70
static const Event CtrlB
Definition event.hpp:69
static const Event CtrlAltH
Definition event.hpp:75
static const Event O
Definition event.hpp:82
static const Event R
Definition event.hpp:85
static const Event AltM
Definition event.hpp:80
static const Event CtrlR
Definition event.hpp:85
static const Event CtrlAltW
Definition event.hpp:90
static const Event CtrlAltO
Definition event.hpp:82
static const Event CtrlY
Definition event.hpp:92
static const Event Custom
Definition event.hpp:96
static const Event A
Definition event.hpp:68
static const Event AltG
Definition event.hpp:74
static const Event p
Definition event.hpp:83
static const Event l
Definition event.hpp:79
static const Event CtrlH
Definition event.hpp:75
struct Mouse mouse
Definition event.hpp:143
std::string DebugString() const
イベントの文字列表現を返します。
Definition event.cpp:90
static const Event AltO
Definition event.hpp:82
static const Event CtrlJ
Definition event.hpp:77
static const Event CtrlAltM
Definition event.hpp:80
static const Event CtrlS
Definition event.hpp:86
static const Event Z
Definition event.hpp:93
static const Event AltR
Definition event.hpp:85
static const Event CtrlW
Definition event.hpp:90
static const Event CtrlN
Definition event.hpp:81
static const Event F2
Definition event.hpp:65
static const Event CtrlM
Definition event.hpp:80
static const Event G
Definition event.hpp:74
static const Event Backspace
Definition event.hpp:50
static const Event d
Definition event.hpp:71
static const Event CtrlAltR
Definition event.hpp:85
static const Event CtrlK
Definition event.hpp:78
static const Event x
Definition event.hpp:91
static const Event F7
Definition event.hpp:65
static const Event ArrowUp
Definition event.hpp:41
const std::string & input() const
Definition event.hpp:103
static const Event Tab
Definition event.hpp:54
static const Event r
Definition event.hpp:85
static const Event AltU
Definition event.hpp:88
static const Event CtrlQ
Definition event.hpp:84
static const Event CtrlAltZ
Definition event.hpp:93
static const Event AltN
Definition event.hpp:81
static const Event AltA
Definition event.hpp:68
static const Event ArrowDown
Definition event.hpp:42
static const Event End
Definition event.hpp:60
static const Event F11
Definition event.hpp:65
static const Event CtrlG
Definition event.hpp:74
static const Event n
Definition event.hpp:81
static const Event q
Definition event.hpp:84
static const Event AltZ
Definition event.hpp:93
static const Event Home
Definition event.hpp:59
static const Event C
Definition event.hpp:70
static const Event AltD
Definition event.hpp:71
static const Event CtrlAltY
Definition event.hpp:92
static const Event AltJ
Definition event.hpp:77
static const Event F8
Definition event.hpp:65
static const Event CtrlAltL
Definition event.hpp:79
static const Event U
Definition event.hpp:88
static const Event o
Definition event.hpp:82
static const Event AltB
Definition event.hpp:69
static const Event F4
Definition event.hpp:65
static const Event t
Definition event.hpp:87
static const Event y
Definition event.hpp:92
static const Event ArrowUpCtrl
Definition event.hpp:46
static const Event k
Definition event.hpp:78
static const Event CtrlAltS
Definition event.hpp:86
static const Event s
Definition event.hpp:86
static const Event I
Definition event.hpp:76
static const Event CtrlT
Definition event.hpp:87
static const Event F
Definition event.hpp:73
static const Event AltI
Definition event.hpp:76
static const Event F10
Definition event.hpp:65
static const Event AltP
Definition event.hpp:83
static const Event PageDown
Definition event.hpp:62
static const Event Y
Definition event.hpp:92
static const Event CtrlAltK
Definition event.hpp:78
static const Event F6
Definition event.hpp:65
static const Event CtrlAltG
Definition event.hpp:74
static const Event CtrlA
Definition event.hpp:68
static const Event i
Definition event.hpp:76
static const Event AltS
Definition event.hpp:86
static const Event g
Definition event.hpp:74
static const Event F1
Definition event.hpp:65
static const Event S
Definition event.hpp:86
static const Event Return
Definition event.hpp:52
static const Event CtrlAltU
Definition event.hpp:88
static const Event V
Definition event.hpp:89
static const Event CtrlAltT
Definition event.hpp:87
static const Event CtrlAltA
Definition event.hpp:68
static const Event AltE
Definition event.hpp:72
static const Event P
Definition event.hpp:83
static const Event CtrlD
Definition event.hpp:71
static const Event ArrowLeft
Definition event.hpp:39
static const Event CtrlAltB
Definition event.hpp:69
static const Event AltV
Definition event.hpp:89
static const Event v
Definition event.hpp:89
static const Event e
Definition event.hpp:72
static const Event CtrlO
Definition event.hpp:82
static const Event Delete
Definition event.hpp:51
static const Event CtrlAltV
Definition event.hpp:89
static const Event ArrowDownCtrl
Definition event.hpp:47
static const Event AltX
Definition event.hpp:91
static const Event CtrlAltD
Definition event.hpp:71
static const Event L
Definition event.hpp:79
static const Event W
Definition event.hpp:90
static const Event f
Definition event.hpp:73
static const Event Insert
Definition event.hpp:58
static const Event CtrlI
Definition event.hpp:76
static const Event ArrowRightCtrl
Definition event.hpp:45
static const Event c
Definition event.hpp:70
static const Event CtrlAltQ
Definition event.hpp:84
static const Event M
Definition event.hpp:80
static Event Special(std::string)
ライブラリのユーザーによって意味が定義されるカスタムイベント。
Definition event.cpp:73
static const Event ArrowRight
Definition event.hpp:40
イベントを表します。キープレスイベント、ターミナルのリサイズなど、さまざまなイベントがあります。
Definition event.hpp:28
マウスイベント。マウスの座標、押されたボタン、 および修飾子(shift, ctrl, meta)が含まれます。
Definition mouse.hpp:11
FTXUI ftxui:: 名前空間
Definition animation.hpp:9
std::string to_string(const std::wstring &s)