libreadline - readline: remapping \C-m (Ctrl+m) -


i want have custom binding \c-m in ~/.inputrc. however, moment replace can no longer enter commands. e.g.,

"\c-m": vi-forward-word 

the problem seems there exists default binding

"\c-m": accept-line 

that not problem in appears other programs (the terminal?) send ^m (ctrl-m) indicate carriage return. in setup have urxvt tried xterm, behavior same (return no longer works once add "\c-m" vi-forward-word binding @ end of inputrc).

now want changed, willing patch program/library involved. question is: should relevant pieces? checked readline source code not find indicating \c-m reused internally. similarly, checked urxvt cannot find mapping carriage return \c-m in code (which best guess happening cause behavior). interestingly there rxvt.7.pod containing

kp_enter  ^m      esc o m 

and rxvt-unicode.termcap with

...:cr=^m:... 

however, both files seem documentation or @ least not installed. knowledge of terminfo files , involvement in overall terminal workings limited. same true interaction between readline , terminal (is readline invoked before urxvt, in example?). if has pointer grateful.

as aside: moment add

"\r": accept-line 

after "\c-m" binding original behavior (that is, return works). if add line before "\c-m" return still not work expected.

cheers!

deso

the "\r", "\c-m", "c-m", ^m same character: ascii cr (carriage return), , carriage return mapped newline (ascii lf line-feed). behavior assumed readline, of course. application using readline library in principle suppress mapping, there few things usefully .inputrc file , shell.

the line

kp_enter  ^m      esc o m 

is irrelevant here: refers enter key on numeric keypad, not enter key on main keyboard.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -