Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i type Ctrl+Left or Ctrl+Right within Guake or gnome-terminal the last one's behaviour turns to a some kind of non-usual mode: - key acts like arrow up and + like arrow down, v runs Nano, etc. How can i disable this feature ?

UPD: my friend told me that's X.org hotkeys... How can i disable 'em? Googling does not help at all...

UPD2: here's a video showing what's going on.

share|improve this question
Probably something with your settings. I don't have that behavior, neither for guake nor gnome-terminal. – phunehehe Jul 27 '11 at 15:18
Sounds pretty much like how emacs/vi work... completely intuitive. :-) – Mehrdad Jul 27 '11 at 15:31
Does this happen in another account with your distribution's default settings? If you press Ctrl+V then Ctrl+Left at a shell prompt, does this insert characters (if so, which) or not? – Gilles Jul 27 '11 at 16:02
Ctrl+v and then Ctrl+left inserts ^[[1;5C. – shybovycha Jul 29 '11 at 10:08
And yes, this issue is present for another account. – shybovycha Jul 29 '11 at 10:10
up vote 6 down vote accepted

The solution was pretty elegant and simple: editing /etc/inputrc and disabling vi mode.

Here's the renewed inputrc file:

# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.

# Be 8 bit clean.
set input-meta on
set output-meta on

#set editing-mode vi

# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.

# set convert-meta off

# try to enable the application keypad when it is called.  Some systems
# need this to enable the arrow keys.
# set enable-keypad on

# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys

# do not bell on tab-completion
# set bell-style none
# set bell-style visible

# some defaults / modifications for the emacs mode
#$if mode=emacs

# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert

# mappings for "page up" and "page down" to step to the beginning/end
# of the history
# "\e[5~": beginning-of-history
# "\e[6~": end-of-history

# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward

# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word

$if term=rxvt
"\e[8~": end-of-line
"\eOc": forward-word
"\eOd": backward-word

# for non RH/Debian xterm, can't hurt for RH/Debian xterm
# "\eOH": beginning-of-line
# "\eOF": end-of-line

# for freebsd console
# "\e[H": beginning-of-line
# "\e[F": end-of-line


Should read more 'bout that modes. Thanks everybody for the trouble-taking!

share|improve this answer

According to nano's title bar, you are editing a bash history file after you press v:


I suspect that Ctrl-Left and Ctrl-Right are activating the interactive history mode.

Does your .bashrc contain bindings for history-search-backward and history-search-forward?

You can disable this behaviour by commenting out, or removing, any of those bind lines in your .bashrc or in .bash_aliases.

share|improve this answer

I've had the same problem. My /etc/inputrc was configured correctly, but due to some strange reason I had skeleton configuration in ~/.inputrc which then disabled all the mappings in /etc/inputrc.

So, my solution was:

rm ~/.inputrc

Hope, it helps somebody :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.