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.

Default in most terminal you can press ctrl\ to send a SIGQUIT signal to the process.

However on my keyboard to type a backslash, you have to do it like this: altshift7

Doing ctrlaltshift7 doesn't work, so how should I do the keyboard shortcut?

share|improve this question
    
Can you not rebind the shortcut to be something you can type simply? –  Xyon Nov 15 '12 at 12:49
    
What keyboard is that? –  week Nov 15 '12 at 12:53
    
@week Danish OSX keyboard. –  Tyilo Nov 15 '12 at 13:48
add comment

2 Answers

I don’t know how you can type Ctrl\, but I can give you an alternative way to generate SIGQUIT from the keyboard.  Find a character that you can type as a simple key combination.  This may need to map to an ASCII character; e.g., CtrlA.  Then type

stty quit ^A

That can be either sttyquitCtrlA Enter (if you get an error message, try typing CtrlV before the CtrlA) or literally sttyquit^A Enter (if you get an error message, try putting the ^A in quotes).  Then type a command like sleep 9, press your key combination (CtrlA), and see whether the program quits as you would expect for Ctrl\.

If you find a combination that works, put it (the stty quit command) into your .login, .profile, .bashrc, or whatever initialization command file you use.

share|improve this answer
add comment

Edit: Since the previous recommendation didn't work, have you tried mapping a different key to ^\?

For instance (in OSX terminal): Go to Terminal->Preferences->Settings->Keyboard, click the + and map something like CTRL+F4 to \034.

share|improve this answer
    
<kbd>ctrl</kbd><kbd>4</kbd> just results in the 4 being typed. –  Tyilo Nov 15 '12 at 13:49
    
kbd tag doesn't work in the comments. use the backquote instead. Ctrl + 4 –  pratnala Nov 15 '12 at 17:04
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.