0

I just started using mintty, and I was wondering if there's a way to customize the keyboard shortcuts?

I understand that we can use the mouse to highlight words/sentences, right click to copy and paste. But I would like to be able to use the keyboard instead of mouse to do those things.

For example (the usual):

  • to highlight a word/sentence: Shift+arrow key

  • copy : Ctrl+c

  • paste : Ctrl+v

1 Answer 1

0

short: no

long: mintty translates the keyboard keys along with modifiers (shift, control, alt) into sequences of characters without providing a way to reprogram these sequences of characters. The shell or other application that you are using has to decide what to do with these characters, and in principle that application could do different things.

But mapping special keys into control+C and control+V is not the way shells generally work. Those characters have meaning to shells (for signals and line-editing). You can see those in the output from stty, e.g.,

$ stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

Further reading:

You must log in to answer this question.