LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash remapping ctrl+c (https://www.linuxquestions.org/questions/linux-newbie-8/bash-remapping-ctrl-c-873762/)

invalid888 04-08-2011 07:31 AM

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

MTK358 04-08-2011 08:34 AM

In case this helps, in many terminals Ctrl+Shift+C copies (and Ctrl+Shift+V is for paste).

invalid888 04-08-2011 09:35 AM

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


All times are GMT -5. The time now is 05:08 AM.