From: pg on 16 Jan 2010 03:16 I want to bind Control+Backspace in readline. Is this possible? When I add "\c-\b": kill-word inside ~/.inputrc, there is no effect; Control+Backspace behaves the same as Backspace. On the console, I used `showkey' to show the keycodes. They are: ^? for Backspace ^H for Control+Backspace ^[^? for Meta+Backspace But on the console, even Control+Arrow or Meta+Arrow do not work, while in xterm they do. Thanks in advance for your help! I am not subscribed to the list, so please add me explicitly in your replies.
From: Stephane CHAZELAS on 16 Jan 2010 06:05 2010-01-16, 00:16(-08), pg(a)gmail.com: > I want to bind Control+Backspace in readline. Is this possible? When I > add It is only possible if pressing <Ctrl-Backspace> sends a different character (or character sequence to the application). > > "\c-\b": kill-word That doesn't make sense. \b is already a ctrl character. (\c-h or \c-?). Control characters are character 0 to 31 and 127, that's all. What you need is configure your terminal so that it sends a specific character sequence upon pressing <Ctrl-Backspace>, and map that to kill-word. Or simply make it send the ^W character so that it works everywhere. With xterm, to do that, you'd install the X resource: XTerm.VT100.translations: #override\ Ctrl <KeyPress> BackSpace: string(0x17) (either install that in the X server with xrdb or put it in one of the resource files read by xterm (for instance your ~/.Xdefaults). [...] > But on the console, even Control+Arrow or Meta+Arrow do not work, > while in xterm they do. In bash, type <Ctrl-V> followed by a key to see what character(s) is (are) sent. > Thanks in advance for your help! I am not subscribed to the list, so > please add me explicitly in your replies. This is usenet, not a mailing list. -- St�phane
From: mop2 on 16 Jan 2010 17:30 On Sat, 16 Jan 2010 06:16:25 -0200, pg(a)gmail.com <phil.ganchev(a)gmail.com> wrote: > I want to bind Control+Backspace in readline. Is this possible? When I > add > > "\c-\b": kill-word > > inside ~/.inputrc, there is no effect; Control+Backspace behaves the > same as Backspace. On the console, I used `showkey' to show the > keycodes. They are: > > ^? for Backspace > ^H for Control+Backspace > ^[^? for Meta+Backspace > > But on the console, even Control+Arrow or Meta+Arrow do not work, > while in xterm they do. For console try: file inputrc: "\C-H": kill-word command line: bind '"\C-H": kill-word'
|
Pages: 1 Prev: Why NonZero Exit Status Next: Run a program under certain amount of physical memory? |