zulip-terminal
zulip-terminal copied to clipboard
Select alternative send-message key instead of ctrl-D, due to readline conflict
As mentioned by @punchagan, the recently introduced extra key for sending a message conflicts with the key used by readline.
@punchagan suggested ctrl-j or ctrl-m and pointed to http://ascii-table.com/control-chars.php
I wondered if we could use a different alt combination?
@punchagan Was there a reason that you selected ^j or ^m? What about eg. ^x (ctrl-x) ?
In some special cases, I use ^jin my text editor (Emacs) to insert a newline. I'm okay using any other key, if it makes more sense mnemonically.
I'm a little hesitant about ^x because I could easily fat-finger and ^c!
Well, ^x is just as close to ^c as ^d?
@rht Any thoughts on this, as another terminal user (?)
Too bad ^d can't be used. I have used ^j occasionally but never ^m.
From ergonomics standpoint, ^j is easier to type than ^d, even with caps-lock mapped to <ctrl>.
Both ^j and ^m do currently do something in the editbox, apparently, at least here.
What do we think of ^o? Is that going to be an issue with terminals having an 'open' shortcut? Anything else?
In my opinion it would be nice to have a way to temporarily change behavior of 'Enter' (togle activated/deactivated by different shortcut), so pressing enter would result in sending message. If I know ahead of time that I will send a few short (one-line) messages then I will enable this new behavior.
From my pov (as a new user of zulip-terminal) sending short messages should be something which does not require pressing more than one key.
@mregdos The option you raise is perhaps a different solution, but we could consider duplicating an aspect of the webapp by adding an option which affects whether 'Enter' sends or adds a newline, though I would expect it to be off by default.
This doesn't remove the need for a substitute key for cases where the existing set doesn't work, and where ctrl-d still conflicts with readline.
I'm not sure if this is possible or not but It would be awesome. If at the time of installation it's been asked to the user if what set of keys a user wants to use to send a message.