diff options
author | nicm <nicm> | 2020-05-16 16:35:13 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-16 16:35:13 +0000 |
commit | 292b335ca5b594729cf9ff79f0f4273c725537a4 (patch) | |
tree | 0eec72b4ead11b18a656536d517ca119e89c9dea /status.c | |
parent | e2a26740b9880d0066c8a04ca2d7202e7f99bd07 (diff) | |
download | rtmux-292b335ca5b594729cf9ff79f0f4273c725537a4.tar.gz rtmux-292b335ca5b594729cf9ff79f0f4273c725537a4.tar.bz2 rtmux-292b335ca5b594729cf9ff79f0f4273c725537a4.zip |
Separate key flags and modifiers, log key flags, make the "xterm" flag
more explicit and fix M- keys with a leading escape.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -827,7 +827,7 @@ status_prompt_translate_key(struct client *c, key_code key, key_code *new_key) return (1); case 'b': case 'B': - *new_key = 'b'|KEYC_ESCAPE; + *new_key = 'b'|KEYC_META; return (1); case 'd': *new_key = '\025'; @@ -836,7 +836,7 @@ status_prompt_translate_key(struct client *c, key_code key, key_code *new_key) case 'E': case 'w': case 'W': - *new_key = 'f'|KEYC_ESCAPE; + *new_key = 'f'|KEYC_META; return (1); case 'p': *new_key = '\031'; /* C-y */ @@ -1023,7 +1023,7 @@ status_prompt_key(struct client *c, key_code key) int keys; if (c->prompt_flags & PROMPT_KEY) { - keystring = key_string_lookup_key(key); + keystring = key_string_lookup_key(key, 0); c->prompt_inputcb(c, c->prompt_data, keystring, 1); status_prompt_clear(c); return (0); @@ -1039,7 +1039,7 @@ status_prompt_key(struct client *c, key_code key) free(s); return (1); } - key &= ~KEYC_XTERM; + key &= ~KEYC_MASK_FLAGS; keys = options_get_number(c->session->options, "status-keys"); if (keys == MODEKEY_VI) { @@ -1158,7 +1158,7 @@ process_key: c->prompt_index = idx; goto changed; - case 'f'|KEYC_ESCAPE: + case 'f'|KEYC_META: case KEYC_RIGHT|KEYC_CTRL: ws = options_get_string(oo, "word-separators"); @@ -1182,7 +1182,7 @@ process_key: c->prompt_index--; goto changed; - case 'b'|KEYC_ESCAPE: + case 'b'|KEYC_META: case KEYC_LEFT|KEYC_CTRL: ws = options_get_string(oo, "word-separators"); |