key binding table.

Forum rules
Before you post please read this

key binding table.

Postby rayandrews on Sun Oct 23, 2011 3:16 pm

Hi All,

I just spent the whole morning looking for some complete table showing me what the keybindings are for the entire keyboard as one might use them in /etc/inputrc. There are a zillion specific examples but no complete list.

\e[A == UpArrow
\e[1~ == Home
etc.

Can anyone point me to a complete list? If I'm going to start playing with inputrc, I want to know what all my options are. It seems hard to believe that this information would not be easy to find.

Thanks
rayandrews
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 10, 2011 8:56 pm

Linux Mint is funded by ads and donations.
 

Re: key binding table.

Postby xenopeek on Sun Oct 23, 2011 3:40 pm

For information on how to edit the inputrc file, see info bash under the Readline Initialization section. info readline also has examples of the keybindings. That gives you all the info to make keybindings for Ctrl or Meta key + any printable key. For non-printable keys, you need to use the escape character and the escape sequence. Some examples are given in the info pages, other escape sequences you can find out with the read command as detailed here: https://code.google.com/p/iterm2/wiki/Keybindings#Escape_sequence_exploration
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14505
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: key binding table.

Postby rayandrews on Mon Oct 24, 2011 12:33 pm

Vincent Vermeulen wrote:For information on how to edit the inputrc file, see info bash under the Readline Initialization section. info readline also has examples of the keybindings. That gives you all the info to make keybindings for Ctrl or Meta key + any printable key. For non-printable keys, you need to use the escape character and the escape sequence. Some examples are given in the info pages, other escape sequences you can find out with the read command as detailed here: https://code.google.com/p/iterm2/wiki/Keybindings#Escape_sequence_exploration


Vincent,

Thanks, some pretty detailed information there. But still no complete table of all possible keys available for binding.
rayandrews
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 10, 2011 8:56 pm

Re: key binding table.

Postby xenopeek on Mon Oct 24, 2011 1:00 pm

rayandrews wrote:But still no complete table of all possible keys available for binding.

Yeah, I know. Couldn't find it either. But with the read command and the other info, you can get all the info. A table of all the keybindings won't be there until somebody makes it (hint hint :wink:).
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14505
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: key binding table.

Postby rayandrews on Mon Oct 24, 2011 1:17 pm

Vincent Vermeulen wrote:
rayandrews wrote:But still no complete table of all possible keys available for binding.

Yeah, I know. Couldn't find it either. But with the read command and the other info, you can get all the info. A table of all the keybindings won't be there until somebody makes it (hint hint :wink:).


Ok, thanks Vincent, I'll stop looking then. I'm still adapting to linux culture, it's strange how something so powerful can still be so lacking in some of the most basic conviniences that one takes for granted even in DOS. For example, I'm still trying to get bash to have even the simplest of the many command line editing and history recall features that 4DOS/4NT has.
rayandrews
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 10, 2011 8:56 pm

Re: key binding table.

Postby xenopeek on Mon Oct 24, 2011 1:38 pm

Reportedly, zsh is more like 4DOS than bash. The default shell on Linux Mint is bash, but you can also install zsh (sudo apt-get install zsh). Might be worth having a look. More info here: http://www.zsh.org/
You can change what you default shell is in Menu > Control Center > Users and Groups, Advanced Settings button, Advanced tab, change the Shell setting to zsh.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14505
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: key binding table.

Postby rayandrews on Mon Oct 24, 2011 9:30 pm

Vincent Vermeulen wrote:Reportedly, zsh is more like 4DOS than bash. The default shell on Linux Mint is bash, but you can also install zsh (sudo apt-get install zsh). Might be worth having a look. More info here: http://www.zsh.org/
You can change what you default shell is in Menu > Control Center > Users and Groups, Advanced Settings button, Advanced tab, change the Shell setting to zsh.


Yeah, I've been considering a switch to zsh, but I wanted to learn at least a bit of bash so that I'd be able to make an informed comparison. So little time, so much to know ;-)
rayandrews
Level 2
Level 2
 
Posts: 99
Joined: Sun Jul 10, 2011 8:56 pm

Re: key binding table.

Postby ChickenPie4Tea on Tue Feb 07, 2012 7:56 am

well nearly all the commands are the same - so you can use them in zsh - it's just that zsh has extras
ChickenPie4Tea
Level 3
Level 3
 
Posts: 109
Joined: Sun Jan 22, 2012 6:44 pm

Linux Mint is funded by ads and donations.
 

Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest