Keystrokes and commands for my inputrc — key-combination for “Shift-Space”, remap “Ctrl-PageUp/PageDown” to something without Page-keys

4

1

I need to add some things to my inputrc. I'm using bash 4, as OS I'm using debian and OSX. My terminal emulators are rxvt-unicode-256 on debian and Terminal.app on OSX. My new macbook has no Insert/Delete, Home/End, PgUp/PgDown keys...

Could you please tell me the keystroke for "Shift-Space"? I'm trying to bind this to menu-complete-backward. Shift-Tab does menu-complete, the keystroke for this is "\e[Z".

"\e[Z": menu-complete
"(Shift-Space)": "\e-1\C-i"

Then I'd like to be able to go page up/down in my terminal. I'm not sure, how to say that. E.g. in irssi I'd like to scroll up/down in my channel log. The keys "PgUp"/"PgDn" do these, but I don't have those keys on my macbook. So I'd like an alternative, like maybe "Shift-ArrowKeyUp" and "Shift-ArrowKeyDown". Also I don't know the commands for inputrc, which I have to bind to this keystroke.

Same for "Home"/"End" keys which should go to beginning-/end-of-line. I'd like to bind that to maybe "Shift-ArrowKeyLeft"/"Shift-ArrowKeyRight".

Thanks very much for your help!

EDIT: Here's my .inputrc ... http://paste.debian.net/69454/

fooness

Posted 2013-12-05T17:14:07.083

Reputation: 41

I am wondering the same thing. Did you ever find the solution? – Casey Jones – 2017-11-15T08:29:37.313

i am also wondering the same thing, and the answer is incorrect – xdavidliu – 2019-10-12T21:32:20.523

Answers

1

Run od -c <<< "Ctrl+V Sequence I care about" and use that in ~/.inputrc.

Ignacio Vazquez-Abrams

Posted 2013-12-05T17:14:07.083

Reputation: 100 516

-1 ; this answer does not work for shift+space – xdavidliu – 2019-10-12T21:31:06.403

1Sorry I don't understand that? What should be in ""? – fooness – 2013-12-05T17:27:53.907

1First you press Ctrl-V. Then you press the sequence you care about. – Ignacio Vazquez-Abrams – 2013-12-05T17:28:25.317

4That just creates "^V" (Ctrl-V) and then Spaces (Shift-Space seems just to be the same as when just pressing Space)... – fooness – 2013-12-05T17:30:59.393