通常は、Ctrl+Cは割り込みに割り当ててありますが、コピーのショートカットと被ってしまいます。
ハッキリ言って、コピーは多用しますが、割り込みは多用しないので、Systemの割り当てを変更します。
1.割り当て可能なキーを探します。
[root@miracle ~]# stty -a speed 38400 baud; rows 50; columns 88; line = 0; intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar 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
左手の指で届く範囲で探すと「F」が空いてるのでそれにします。
使い辛かったら、また変えればいいだけです。
2.ファイルに設定
次回起動時にも有効になるように、~neko/.bashrcに記載します。
[neko@miracle ~]$ vi ~neko/.bashrc # User specific aliases and functions stty intr ^f ← 追加
読み込んで有効にします。
[neko@miracle ~]# source ~neko/.bashrc
3.動作確認
[neko@miracle ~]$ ping yahoo.co.jp PING yahoo.co.jp (182.22.25.124) 56(84) bytes of data. 64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=1 ttl=58 time=32.5 ms 64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=2 ttl=58 time=39.0 ms ^C64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=3 ttl=58 time=70.3 ms ← Ctrl+Cで止まらない 64 bytes from 182.22.25.124 (182.22.25.124): icmp_seq=4 ttl=58 time=44.3 ms ^F ← Ctrl+Fで止った --- yahoo.co.jp ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 32.509/46.540/70.305/14.345 ms
コメント