How to set keys (backspace, interrupt, suspend, kill)?

Using stty one can set some of keys like backsapce, interrupt, suspend and kill.
$ stty -a # shows the current terminal settings
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;

$ stty erase \^? # set backspace key for backspace
$ stty intr \^C # set Control-C for interrupt
$ stty susp \^Z # set Control-Z for suspend
$ stty kill \^U # set Control-U for kill

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s