diff --git a/TODO b/TODO index 4289f8a5..d479eb48 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/client-cmd.c b/client-cmd.c index 2d98d02d..62c84978 100644 --- a/client-cmd.c +++ b/client-cmd.c @@ -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 @@ -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); +}