LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2011, 07:31 AM   #1
invalid888
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
bash remapping ctrl+c


hey,

I have been looking around for a way to remap ctrl+c (intr command). I came across the command stty intr ^[alphakey]. So I tried using stty intr ^I to remap it from ctrl+c to ctrl+i.

The only problem with this is that it also changed my tab key. Every time i press tab, i get the intr key press (ie it is like i pressed ctrl+I).

I am a windows user normally and I use ctrl+c to copy. I absolutely hate it when i try to copy something out of a terminal window and it kills my process because i used ctrl + c. I could care less about remapping the copy command, I just want to find a way to remap the intr command to some other key.

I did come across something that mentioned inputrc, but I couldn't figure out how to use it correctly.

I am pretty new to linux, so it would be helpful if you spelled out any help you can provide.

Thanks
 
Old 04-08-2011, 08:34 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
In case this helps, in many terminals Ctrl+Shift+C copies (and Ctrl+Shift+V is for paste).
 
Old 04-08-2011, 09:35 AM   #3
invalid888
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
thanks for the sht+ctrl+c, I was aware of that.

note : I think i figured out why ctrl + I is messing with my tab key. after some more searching I found that ctrl + I is preset to represent the tab press. So that was one reason why ctrl + I was doing both intr and tab.

Although this still doesn't solve the problem of remapping intr. It seems that pretty much ever alpha key is already mapped to something else. Some of these are in the stty -a list, others are not. I would be good with using other keys like shift, alt, or the F keys.

thanks
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remapping shift&ctrl keys kills key repetition nitro2k01 Linux - Desktop 2 02-13-2010 12:56 PM
bash ctrl+c tarp and bash read with timeout !?! bull81 Programming 10 01-25-2010 09:56 AM
Ctrl + C in bash mircan Linux - General 5 12-08-2009 02:48 PM
Any way to create bash short cuts (like CTRL+l for clear and Ctrl+D for exit) supersubu123 Linux - General 5 05-30-2007 03:02 AM
bash ctrl+a not working! SteveGodfrey Linux - General 3 09-10-2004 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:01 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
Open Source Consulting | Domain Registration