Skip to content

Commit bcbaf92

Browse files
Send \r instead of \n to the application when enter has been pressed.
1 parent 6b2eb1a commit bcbaf92

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pymux/key_mappings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ def prompt_toolkit_key_to_vt100_key(key, application_mode=False):
5757
Keys.Down: '\x1bOB',
5858
}
5959

60+
if key == Keys.ControlJ:
61+
# Required for redis-cli. This can be removed when prompt_toolkit stops
62+
# replacing \r by \n.
63+
return '\r'
64+
6065
if key == '\n':
6166
return '\r'
6267

0 commit comments

Comments
 (0)