LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 05-15-2012, 09:44 AM   #1
markdibley
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
Swapping Esc-f and Ctrl-f for commandline word jumping


Hello

Is there a way of swapping the keymappings of Ctrl-f with Esc-f. A common shortcut in all sorts of applications is jumping the cursor forward 1 word using Ctrl-f. However, Linux has it mapped to Esc-f. And you can't hold Esc down for multiple key presses.

Any advice on making this change would be great.

Thanks

Mark
 
Old 05-15-2012, 09:53 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,166

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
actually Ctrl is a key modifier, but Esc is a key, so I do not really understand what do you want. From the other hand linux has not mapped anything. You can map keys in shells or in an editor, or?? Can you please specify where is it occured?
 
Old 05-15-2012, 09:57 AM   #3
markdibley
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
actually Ctrl is a key modifier, but Esc is a key, so I do not really understand what do you want. From the other hand linux has not mapped anything. You can map keys in shells or in an editor, or?? Can you please specify where is it occured?
My incorrect terminology is probably confusing. I am not necessarily looking to map keys. What I would like to do is replicate the action achieved on the command line when using Esc-f with something that uses either the Ctrl or Alt key.

To be totally clear, when you use Esc-f on the command line the cursor moves 1 word forward. I would like to do the same using either Ctrl-f or Alt-f.

Thanks for your reply.
 
Old 05-15-2012, 12:48 PM   #4
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,166

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
so that is the bash bindings. See this page in general. Also this page about the basics of bindings

bind "\C-f":forward-word
should bind Ctrl-f to forward word
 
Old 05-15-2012, 01:10 PM   #5
markdibley
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Hi

Thanks for that. I am actually using tcsh, but your reply led me to this page which not only shows the same thing for tcsh but also reminds me that what I really wanted was Ctrl-right and Ctrl-left.

Thanks again for your help. This will make a lot of difference to my working environment.

Mark
 
Old 05-15-2012, 01:14 PM   #6
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,166

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.

I'm glad to help you
 
  


Reply

Tags
commandline, shortcut


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl and Esc doesn't list anything Bjwebb Linux - Software 2 06-19-2007 04:12 PM
Make ctrl-alt-esc = xkill Oh Cisco Debian 3 07-20-2006 02:40 PM
ctrl + alt + esc kde, its not there cheater1034 Linux - Software 1 09-14-2004 12:22 AM
Ctrl-Alt-Esc keys Mojojo Linux - General 3 07-02-2003 04:26 PM
Analog of Ctrl+Esc chem1 Linux - Software 5 06-06-2003 09:48 PM


All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration