博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

CalmArrow

【打好基础】全力以赴,顺其自然【每天进步一点点】
  piaoxiang.cublog.cn

关于作者
姓名:CalmArrow(lqm)
职业:硕士在读
位置:山东济南
研究:嵌入式系统设计
联系:piaoxiangxinling@163.com

信仰:
    1、永远保持积极向上(积极的心态,积极的思考,积极的行动),享受生活给予的一切!
    2、做正确的事,正确的做事;用心去做,做到最好!
    3、如果你觉得不幸福,那么请你把幸福的门槛降低一些,不要把幸福拒之门外。。。

方向:
    在嵌入式系统设计中感兴趣的方向有:ARM、Linux、网络通信

目标:
    软硬结合,打好基础,提高学习能力,完善知识体系,建立核心优势。

方法:
    理论与实践相结合
    深度与广度相结合
    理解与记忆相结合

说明:
    本Blog仅供学习之用,转载文章如涉及版权,请通知。原创作品如转载,请注明出处。
|| << >> ||
我的分类


用户名登陆,按退格键出现^H问题解决
    这个问题是很古老的问题了,主要涉及到backspace键和delete键的键码映射问题。详细的理解部分可以参考:http://www.ibb.net/~anne/keyboard.html
 

The keymapping problem can be traced back to the time when computers used punched tapes. The only way to correct a wrongly punched character was to punch additional bits in the tape (or rather, punch additional bits _out_ of the tape). Characters with all the bits punched were treated as deleted characters. See 'man ascii' for a list of the ASCII characterset, you'll see that DEL, (octal 177, decimal 127 and hexadecimal 7F) is the one with all the bits punched in (the ASCII code with the highest value). To be able to overwrite a character it is necessary to undo the feed between the characters first. For this the ASCII BS (octal 010, decimal 8, hexadecimal 08) was used. So to erase the last-typed character, you would have to press first BS to move back one character, and then DEL to delete the character. In newer computers either BS or DEL was chosen to move back and delete in one press.

 
    BS(BackSpace) == 0x08  == ^H
    DEL(DELete)  == 0x7F  == ^?
 
    现在host上已经很好的解决了这个问题,但是在嵌入式系统中,还是会出现这个问题,上述文章中提到的通用的解决办法不太适合嵌入式应用,所以暂行的解决办法有:根据你使用的终端,来重新设置码值映射关系。比如我现在使用的是SecureCRT,在会话选项-->映射键-->选中Backspace发送delete,那么在tinylogin和telnet登陆时,退格键就不会打印出^H,而是正常了。如果不修改,这时候backspace又不起作用,那么试一下ctrl+backspace.

发表于: 2008-03-23,修改于: 2008-03-23 17:09,已浏览323次,有评论0条 推荐 投诉


网友评论
 发表评论