From 6ed5051cfc183527575edbd2b624d9ad43d67193 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Sat, 13 Feb 2021 20:00:00 +0100 Subject: [PATCH] Add documentation about ./example/util/print_key_press (#73) Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/72 --- doc/doxygen_layout.xml | 2 +- include/ftxui/component/event.hpp | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/doxygen_layout.xml b/doc/doxygen_layout.xml index 1beab94..d22fec7 100644 --- a/doc/doxygen_layout.xml +++ b/doc/doxygen_layout.xml @@ -5,7 +5,7 @@ - + diff --git a/include/ftxui/component/event.hpp b/include/ftxui/component/event.hpp index 82831b6..14e826a 100644 --- a/include/ftxui/component/event.hpp +++ b/include/ftxui/component/event.hpp @@ -11,10 +11,16 @@ namespace ftxui { /// @brief Represent an event. It can be key press event, a terminal resize, or /// more ... -// -// Documentation: -// https://invisible-island.net/xterm/ctlseqs/ctlseqs.html -// +/// +/// For example: +/// - Printable character can be created using Event::Character('a'). +/// - Some special are predefined, like Event::ArrowLeft. +/// - One can find arbitrary code for special Events using: +/// ./example/util/print_key_press +/// For instance, CTLR+A maps to Event::Special({1}); +/// +/// Useful documentation about xterm specification: +/// https://invisible-island.net/xterm/ctlseqs/ctlseqs.html struct Event { // --- Constructor section --------------------------------------------------- static Event Character(char);