How to interrupt

846 views
Skip to first unread message

Brian O'Meara

unread,
Jun 10, 2011, 2:02:28 PM6/10/11
to iterm2-discuss
I am used to using command+period in Terminal to interrupt. For
example, in "less" you can use the F command to keep streaming new
content as a file is appended to. The way to escape this is command
+period. This doesn't seem to work in iTerm2 (nor in other cases where
I might do command+period, like aborting a command that is taking too
long). How should I do this? I think this is due to something I
haven't configured properly, but I've been through the documentation
and forum and haven't found the solution. I've tried adding command
+period as a key combination in iTerm2 meaning abort but this didn't
seem to work. So far, this is the only thing keeping me from using
iTerm2 all the time rather than Terminal.

Thank you,
Brian

George Nachman

unread,
Jun 10, 2011, 2:56:30 PM6/10/11
to iterm2-...@googlegroups.com
Ah, I see what's going on. It sends a kill signal to the foreground
job. Why not press ^C instead? It should do the same thing.

Evan Laforge

unread,
Jun 10, 2011, 3:02:49 PM6/10/11
to iterm2-...@googlegroups.com
On Fri, Jun 10, 2011 at 11:02 AM, Brian O'Meara <omeara...@gmail.com> wrote:
> I am used to using command+period in Terminal to interrupt. For

Control C is the standard way. It looks like Terminal maps cmd-. to
control c. You can probably map cmd-. to hex 0x03, but it might be
better to just get used to ^C since that works everywhere.

^\ sends sigquit, which sometimes works when sigintr doesn't.

Brian O'Meara

unread,
Jun 10, 2011, 3:17:33 PM6/10/11
to iterm2-discuss
Thank you, George and Evan. Control+C it is. Thanks for the fast
response.

Best,
Brian

TjL

unread,
Jun 10, 2011, 2:58:24 PM6/10/11
to iterm2-...@googlegroups.com
The "proper unix" way to interrupt is control+c although sometimes the
'paging' commands like more/less use 'q' for 'quit'.

command+. is a Mac-ism… which doesn't make it "wrong" just "non-standard" :-)

FWIW

TjL

Art Griesser

unread,
Dec 8, 2016, 6:14:36 PM12/8/16
to iterm2-discuss
I know this is an ancient thread.  But maybe posting an answer here will help someone else.

In iTerm2 you can: 
  • Preferences > Keys > Key Mappings > +   
  • Specify command-. as the Keyboard shortcut
  • Select "Send Hex Codes" as the action
  • Specify 03 (the hex code for control-C) in the unlabeled box
Reply all
Reply to author
Forward
0 new messages