2

I am using cua-mode in emacs, but that overwrites the "Ctrl-Z", which links with suspend job in linux. So, I am thinking of changing the "Ctrl-Z" key binding in linux, and I learned that "Stty" can help me do it. However, I have no clue on how to do it in stty. I haven't found any useful key binding change example using stty online.

Could you help me to provide some example using stty for key binding change? For instance, how do I represent "Shift" key in stty?

Thanks in advance!

1 Answer 1

2
stty susp CHAR

You might need quoting that char with "ctrl-V", e.g. to change it into ctrl-K, you have to type ctrl-V, ctrl-K, usually represented with a circumflex for "ctrl":

stty  susp  ^V^K

There is no feedback on the screen when you type ctrl-V.

Verify with "stty -a" to see what is assigned then.

The shift key itself cannot be used as suspend key. You need a character not a key. Ctrl-Z is ascii-26, which is a character, as is ctrl-K (ascii-10), but the shift key is not a character, not even shift-ctrl-K, which generates still the same ascii-10 character. Of course you can use shift + k-key, which is simply uppercase K, but I guess you don't want that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .