Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've googled for it but failed to found an answer. I would like to remap my interrupt signal key from ^C to or Delete, what would be the code for it? For example:

stty intr "ESC code"

And back:

stty intr ^C
share|improve this question
1  
maybe Delete would be better than Escape? –  130490868091234 Jul 14 '11 at 9:48
    
Indeed avilella –  A Dwarf Jul 14 '11 at 10:33
    
See this SuperUser question for the questioner's real problem, which is to do with using the ping command against multiple hosts. –  JdeBP Jul 15 '11 at 14:48
add comment

2 Answers

up vote 2 down vote accepted

You don't want to do this. The character sequence generated by Esc is also used by the extended keys on the keyboard, so each keypress will be like pressing CtrlC followed by some random characters.

share|improve this answer
add comment
stty intr \033

This works somewhat, but since \033/Escape is used as, well, escape character, it'll break other stuff.

share|improve this answer
    
maybe Delete would be better than Escape? –  130490868091234 Jul 14 '11 at 9:48
    
Maybe not. It would drive you nuts editing the command line! –  Andy Lee Robinson Jul 27 '11 at 15:37
add comment

Your Answer

 
discard

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.