mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Change key-table to mode-table to allow for some future work. From Keith
Amling.
This commit is contained in:
parent
58c97695c9
commit
191f695bad
@ -29,12 +29,12 @@
|
|||||||
|
|
||||||
enum cmd_retval cmd_bind_key_exec(struct cmd *, struct cmd_q *);
|
enum cmd_retval cmd_bind_key_exec(struct cmd *, struct cmd_q *);
|
||||||
|
|
||||||
enum cmd_retval cmd_bind_key_table(struct cmd *, struct cmd_q *, int);
|
enum cmd_retval cmd_bind_key_mode_table(struct cmd *, struct cmd_q *, int);
|
||||||
|
|
||||||
const struct cmd_entry cmd_bind_key_entry = {
|
const struct cmd_entry cmd_bind_key_entry = {
|
||||||
"bind-key", "bind",
|
"bind-key", "bind",
|
||||||
"cnrt:", 1, -1,
|
"cnrt:", 1, -1,
|
||||||
"[-cnr] [-t key-table] key command [arguments]",
|
"[-cnr] [-t mode-table] key command [arguments]",
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
cmd_bind_key_exec
|
cmd_bind_key_exec
|
||||||
@ -67,7 +67,7 @@ cmd_bind_key_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args_has(args, 't'))
|
if (args_has(args, 't'))
|
||||||
return (cmd_bind_key_table(self, cmdq, key));
|
return (cmd_bind_key_mode_table(self, cmdq, key));
|
||||||
|
|
||||||
cmdlist = cmd_list_parse(args->argc - 1, args->argv + 1, NULL, 0,
|
cmdlist = cmd_list_parse(args->argc - 1, args->argv + 1, NULL, 0,
|
||||||
&cause);
|
&cause);
|
||||||
@ -84,7 +84,7 @@ cmd_bind_key_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum cmd_retval
|
enum cmd_retval
|
||||||
cmd_bind_key_table(struct cmd *self, struct cmd_q *cmdq, int key)
|
cmd_bind_key_mode_table(struct cmd *self, struct cmd_q *cmdq, int key)
|
||||||
{
|
{
|
||||||
struct args *args = self->args;
|
struct args *args = self->args;
|
||||||
const char *tablename;
|
const char *tablename;
|
||||||
|
@ -27,12 +27,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
|
enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
|
||||||
enum cmd_retval cmd_unbind_key_table(struct cmd *, struct cmd_q *, int);
|
enum cmd_retval cmd_unbind_key_mode_table(struct cmd *, struct cmd_q *, int);
|
||||||
|
|
||||||
const struct cmd_entry cmd_unbind_key_entry = {
|
const struct cmd_entry cmd_unbind_key_entry = {
|
||||||
"unbind-key", "unbind",
|
"unbind-key", "unbind",
|
||||||
"acnt:", 0, 1,
|
"acnt:", 0, 1,
|
||||||
"[-acn] [-t key-table] key",
|
"[-acn] [-t mode-table] key",
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
cmd_unbind_key_exec
|
cmd_unbind_key_exec
|
||||||
@ -64,7 +64,7 @@ cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args_has(args, 't'))
|
if (args_has(args, 't'))
|
||||||
return (cmd_unbind_key_table(self, cmdq, key));
|
return (cmd_unbind_key_mode_table(self, cmdq, key));
|
||||||
|
|
||||||
if (key == KEYC_NONE) {
|
if (key == KEYC_NONE) {
|
||||||
while (!RB_EMPTY(&key_bindings)) {
|
while (!RB_EMPTY(&key_bindings)) {
|
||||||
@ -81,7 +81,7 @@ cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum cmd_retval
|
enum cmd_retval
|
||||||
cmd_unbind_key_table(struct cmd *self, struct cmd_q *cmdq, int key)
|
cmd_unbind_key_mode_table(struct cmd *self, struct cmd_q *cmdq, int key)
|
||||||
{
|
{
|
||||||
struct args *args = self->args;
|
struct args *args = self->args;
|
||||||
const char *tablename;
|
const char *tablename;
|
||||||
|
8
tmux.1
8
tmux.1
@ -1861,7 +1861,7 @@ Commands related to key bindings are as follows:
|
|||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Xo Ic bind-key
|
.It Xo Ic bind-key
|
||||||
.Op Fl cnr
|
.Op Fl cnr
|
||||||
.Op Fl t Ar key-table
|
.Op Fl t Ar mode-table
|
||||||
.Ar key Ar command Op Ar arguments
|
.Ar key Ar command Op Ar arguments
|
||||||
.Xc
|
.Xc
|
||||||
.D1 (alias: Ic bind )
|
.D1 (alias: Ic bind )
|
||||||
@ -1890,7 +1890,7 @@ If
|
|||||||
is present,
|
is present,
|
||||||
.Ar key
|
.Ar key
|
||||||
is bound in
|
is bound in
|
||||||
.Ar key-table :
|
.Ar mode-table :
|
||||||
the binding for command mode with
|
the binding for command mode with
|
||||||
.Fl c
|
.Fl c
|
||||||
or for normal mode without.
|
or for normal mode without.
|
||||||
@ -1948,7 +1948,7 @@ Send the prefix key, or with
|
|||||||
the secondary prefix key, to a window as if it was pressed.
|
the secondary prefix key, to a window as if it was pressed.
|
||||||
.It Xo Ic unbind-key
|
.It Xo Ic unbind-key
|
||||||
.Op Fl acn
|
.Op Fl acn
|
||||||
.Op Fl t Ar key-table
|
.Op Fl t Ar mode-table
|
||||||
.Ar key
|
.Ar key
|
||||||
.Xc
|
.Xc
|
||||||
.D1 (alias: Ic unbind )
|
.D1 (alias: Ic unbind )
|
||||||
@ -1970,7 +1970,7 @@ If
|
|||||||
is present,
|
is present,
|
||||||
.Ar key
|
.Ar key
|
||||||
in
|
in
|
||||||
.Ar key-table
|
.Ar mode-table
|
||||||
is unbound: the binding for command mode with
|
is unbound: the binding for command mode with
|
||||||
.Fl c
|
.Fl c
|
||||||
or for normal mode without.
|
or for normal mode without.
|
||||||
|
Loading…
Reference in New Issue
Block a user