key ^m enter回车 linux终端 按键问题

原因具体不清楚。
方法:

  1. 看你用的是什么,像window terminal可以设置键绑定。
  2. 像shell ,如zsh 的可以设置key -binding
  3. 有些跟stty有关。输入stty sane 即可。详见链接
  4. 你可以使用cat命令查看你当前的代码:To know the code of a key, execute cat, press enter, press the key, then Ctrl+C.

sane Same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel 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, all special characters to their default values.

源文档:https://www.computerhope.com/unix/ustty.htmhttps://www.computerhope.com/unix/ustty.htm

问题出处:Pressing enter produces ^M instead of a newline

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值