Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 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

2 Answers 2

up vote 5 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

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.