From b8b48e2e37b9dcc1cfebaecbd89d557eca82a0be Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 12 Mar 2020 09:49:43 +0000 Subject: Add C-g to cancel command prompt with vi(1) keys as well as emacs, and q in command mode. --- status.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'status.c') diff --git a/status.c b/status.c index 33f6c47a..6beadb81 100644 --- a/status.c +++ b/status.c @@ -733,6 +733,7 @@ status_prompt_translate_key(struct client *c, key_code key, key_code *new_key) if (c->prompt_mode == PROMPT_ENTRY) { switch (key) { case '\003': /* C-c */ + case '\007': /* C-g */ case '\010': /* C-h */ case '\011': /* Tab */ case '\025': /* C-u */ @@ -813,6 +814,9 @@ status_prompt_translate_key(struct client *c, key_code key, key_code *new_key) case 'p': *new_key = '\031'; /* C-y */ return (1); + case 'q': + *new_key = '\003'; /* C-c */ + return (1); case 's': case KEYC_DC: case 'x': -- cgit