NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c File Reference

Definition of the Key Module. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "core/lib.h"
+ Include dependency graph for module.c:

Go to the source code of this file.

Functions

static bool key_commands_register (struct NeoMutt *n, struct CommandArray *ca)
 Register NeoMutt Commands - Implements Module::commands_register()
 

Variables

const struct Command KeyCommands []
 Key Binding Commands.
 
const struct Module ModuleKey
 Module for the Key library.
 

Detailed Description

Definition of the Key Module.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file module.c.

Function Documentation

◆ key_commands_register()

static bool key_commands_register ( struct NeoMutt * n,
struct CommandArray * ca )
static

Register NeoMutt Commands - Implements Module::commands_register()

Definition at line 39 of file module.c.

40{
42}
bool commands_register(struct CommandArray *ca, const struct Command *cmds)
Add commands to Commands array.
Definition command.c:51
const struct Command KeyCommands[]
Key Binding Commands.
Definition init.c:52
+ Here is the call graph for this function:

Variable Documentation

◆ KeyCommands

const struct Command KeyCommands[]
extern

Key Binding Commands.

Definition at line 52 of file init.c.

52 {
53 // clang-format off
54 { "bind", CMD_BIND, parse_bind,
55 N_("Bind a key to a function"),
56 N_("bind <map>[,<map> ... ] <key> <function>"),
57 "configuration.html#bind" },
58 { "exec", CMD_EXEC, parse_exec,
59 N_("Execute a function"),
60 N_("exec <function> [ <function> ... ]"),
61 "configuration.html#exec" },
62 { "macro", CMD_MACRO, parse_macro,
63 N_("Define a keyboard macro"),
64 N_("macro <map>[,<map> ... ] <key> <sequence> [ <description> ]"),
65 "configuration.html#macro" },
66 { "push", CMD_PUSH, parse_push,
67 N_("Push a string into NeoMutt's input queue (simulate typing)"),
68 N_("push <string>"),
69 "configuration.html#push" },
70 { "unbind", CMD_UNBIND, parse_unbind,
71 N_("Remove a key binding"),
72 N_("unbind { * | <map>[,<map> ... ] } [ <key> ]"),
73 "configuration.html#unbind" },
74 { "unmacro", CMD_UNMACRO, parse_unbind,
75 N_("Remove a keyboard `macro`"),
76 N_("unmacro { * | <map>[,<map> ... ] } [ <key> ]"),
77 "configuration.html#unmacro" },
78
79 { NULL, CMD_NONE, NULL, NULL, NULL, NULL, CF_NO_FLAGS },
80 // clang-format on
81};
#define CF_NO_FLAGS
No flags are set.
Definition command.h:48
@ CMD_EXEC
:exec
Definition command.h:74
@ CMD_UNMACRO
:unmacro
Definition command.h:135
@ CMD_MACRO
:macro
Definition command.h:90
@ CMD_PUSH
:push
Definition command.h:101
@ CMD_NONE
No Command.
Definition command.h:59
@ CMD_BIND
:bind
Definition command.h:67
@ CMD_UNBIND
:unbind
Definition command.h:128
enum CommandResult parse_bind(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'bind' command - Implements Command::parse() -.
Definition commands.c:241
enum CommandResult parse_exec(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'exec' command - Implements Command::parse() -.
Definition commands.c:778
enum CommandResult parse_macro(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'macro' command - Implements Command::parse() -.
Definition commands.c:671
enum CommandResult parse_push(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'push' command - Implements Command::parse() -.
Definition commands.c:204
enum CommandResult parse_unbind(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unbind' and 'unmacro' commands - Implements Command::parse() -.
Definition commands.c:644
#define N_(a)
Definition message.h:32

◆ ModuleKey

const struct Module ModuleKey
Initial value:
= {
"key",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static bool key_commands_register(struct NeoMutt *n, struct CommandArray *ca)
Register NeoMutt Commands - Implements Module::commands_register()
Definition module.c:39
@ MODULE_ID_KEY
ModuleKey, Key mappings
Definition module_api.h:73

Module for the Key library.

Definition at line 47 of file module.c.

47 {
49 "key",
50 NULL, // init
51 NULL, // config_define_types
52 NULL, // config_define_variables
54 NULL, // gui_init
55 NULL, // gui_cleanup
56 NULL, // cleanup
57};