Searching around, I found that stty -ixon enables remapping of C-q and C-s(such as in ~/.inputrc).
Now I also want to remap C-v(to paste-from-clipboard, the default S-Ins feels awkward). With stty -a showing lnext = ^V;, I think stty has another option to enable this. I can find definitions to those options but they are hard to understand, or to find the one I want.
Also, I'm using a cygwin terminal if it matters.
Proof on the answer lies in stty:
- binding C-a to
paste-from-clipboardin cygwin's.inputrcworks - binding C-a to
backward-charon a Ubuntu 14.04.2 works - binding C-v to
backward-charon a Ubuntu 14.04.2 fails
So paste-from-clipboard is a command added by cygwin to its bash, which can be bound to keys the same way as e.g. backward-char.
.inputrcare not related to the ones configured viastty.sttyconfigures the terminal driver,.inputrcconfigures bash and other programs that use the readline library. And copy-paste is provided by yet another entity, the terminal emulator. – Gilles 'SO- stop being evil' Feb 09 '17 at 10:33.inputrc, right? And please post an answer so I can accept it. – JJPandari Feb 10 '17 at 09:35