#include "mologram/ActionRegistry.hpp" namespace mologram { const std::vector& ActionRegistry::all() { static const std::vector a = { {"search", "Ctrl+K", "Chat/Search"}, {"search_chat", "Ctrl+F", "Chat/Search in chat"}, {"chat_prev", "Ctrl+Up", "Go/Previous chat"}, {"chat_next", "Ctrl+Down", "Go/Next chat"}, {"chat_prev_alt", "Alt+Up", "Go/Previous chat"}, {"chat_next_alt", "Alt+Down", "Go/Next chat"}, {"folder_prev", "Ctrl+PgUp", "Go/Previous folder"}, {"folder_next", "Ctrl+PgDn", "Go/Next folder"}, {"back", "Escape", "Go/Back"}, {"send", "Enter", "Message/Send"}, {"newline", "Shift+Enter", "Message/New line"}, {"edit_last", "Up", "Message/Edit last"}, {"fmt_bold", "Ctrl+B", "Format/Bold"}, {"fmt_italic", "Alt+I", "Format/Italic"}, {"fmt_underline", "Ctrl+U", "Format/Underline"}, {"fmt_link", "Ctrl+K", "Format/Link"}, {"fmt_code", "Alt+E", "Format/Code"}, {"fmt_spoiler", "Alt+H", "Format/Spoiler"}, {"emoji", "Ctrl+E", "Message/Emoji"}, {"attach", "Ctrl+O", "Message/Attach"}, {"reply", "Ctrl+R", "Message/Reply"}, {"delete", "Ctrl+D", "Message/Delete"}, {"forward", "Ctrl+G", "Message/Forward"}, {"pin", "Ctrl+P", "Message/Pin"}, {"info", "F3", "View/Info pane"}, {"transfers", "F4", "View/Transfers"}, {"stories", "F5", "View/Stories"}, {"story_post", "F6", "View/Post story"}, {"close_window", "Ctrl+W", "Window/Close"}, {"tear_off", "Ctrl+T", "Window/Open in new window"}, {"settings", "F2", "App/Settings"}, {"help", "F1", "Help/Keys"}, {"quit", "Ctrl+Q", "App/Quit"}, {"float_chat", "Alt+T", "Window/Open floating window"}, {"react", "Alt+R", "Message/React"}, {"select", "Alt+S", "Message/Select"}, {"poll", "Alt+O", "Message/Create poll"}, {"schedule", "Alt+D", "Message/Schedule"}, {"contacts", "Alt+C", "App/Contacts"}, {"new_chat", "Alt+N", "App/New chat"}, {"profile", "Alt+P", "View/Profile"}, {"accounts", "Alt+A", "App/Accounts"}, {"mute", "Alt+M", "Chat/Mute"}, {"archive", "Alt+V", "Chat/Archive"}, {"mark_read", "Alt+K", "Chat/Mark as read"}, {"search_in_chat", "Alt+F", "Chat/Search messages"}, {"pinned_next", "Alt+J", "Message/Next pinned"}, {"call", "F7", "Chat/Call"}, {"secret_chat", "F8", "Chat/Secret chat"}, {"gifts", "Alt+G", "App/Gifts"}, {"business", "Alt+B", "App/Business"}, }; return a; } const ActionDef* ActionRegistry::find(const std::string& id) { for (const auto& a : all()) if (a.id == id) return &a; return nullptr; } } // namespace mologram