Meta meta command.

This commit is contained in:
Nicholas Marriott 2007-10-02 15:38:09 +00:00
parent 4fbbc3dfd3
commit 242e69327f
2 changed files with 16 additions and 3 deletions

2
TODO
View File

@ -21,7 +21,7 @@
- figure out once and for all what is going on with backspace and del
- deal properly with ambiguous ops... list-sessions & list-windows
- keys to add:
meta-meta : pass through meta (will need this...)
NONE?
- commands to add:
rename sessions
swap windows

View File

@ -1,4 +1,4 @@
/* $Id: client-cmd.c,v 1.6 2007-09-30 13:02:14 nicm Exp $ */
/* $Id: client-cmd.c,v 1.7 2007-10-02 15:38:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -22,9 +22,10 @@
int client_cmd_prefix = META;
int client_cmd_fn_msg(int, struct client_ctx *, char **);
int client_cmd_fn_select(int, struct client_ctx *, char **);
int client_cmd_fn_detach(int, struct client_ctx *, char **);
int client_cmd_fn_msg(int, struct client_ctx *, char **);
int client_cmd_fn_meta(int, struct client_ctx *, char **);
struct cmd {
int key;
@ -59,6 +60,7 @@ struct cmd client_cmd_table[] = {
{ 'w', client_cmd_fn_msg, MSG_WINDOWLIST },
{ 'I', client_cmd_fn_msg, MSG_WINDOWINFO },
{ 'i', client_cmd_fn_msg, MSG_WINDOWINFO },
{ META, client_cmd_fn_meta, 0 },
};
#define NCLIENTCMD (sizeof client_cmd_table / sizeof client_cmd_table[0])
@ -104,3 +106,14 @@ client_cmd_fn_detach(
{
return (-1);
}
/* Handle meta command. */
int
client_cmd_fn_meta(unused int arg, struct client_ctx *cctx, unused char **error)
{
uint8_t key = META;
client_write_server(cctx, MSG_INPUT, &key, sizeof key);
return (0);
}