键盘输入如何进入终端? [英] How does the keyboard input get into the terminal?

查看:167
本文介绍了键盘输入如何进入终端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以描述键盘输入在计算机屏幕上的显示方式吗?涉及哪种软件/硬件?

Can someone describe the way how keyboard input gets on the Computer Screen?! What kind of software/hardware is involved?

我的问题是,当我按下键盘上的某个键时,大致或完全会发生什么?涉及哪种软件硬件. 8位ascii是否直接进入CPU?以及如何在操作系统的帮助下将其显示在屏幕上,例如Linux?

my question is what happens roughly or exactly when i press a key on my keyboard? what kind of software hardware is involved. does the 8 bit ascii gets directly to the cpu? and how does it get onto the screen with the help of the OS e.g. Linux?

推荐答案

我建议您在计算机键盘的工作方式.总而言之:

I recommend you check out this website called HowStuffWorks on How Computer Keyboards Work. It states in sum:

键入时,键盘中的处理器会分析键矩阵并 确定要发送到计算机的字符.它维护这些 字符放入其内存缓冲区中,然后发送数据.

As you type, the processor in the keyboard analyzes the key matrix and determines what characters to send to the computer. It maintains these characters in its memory buffer and then sends the data.

许多键盘通过PS/2或USB电缆通过电缆连接到计算机. USB(通用串行总线)连接器.笔记本电脑使用内部连接器.

Many keyboards connect to the computer through a cable with a PS/2 or USB (Universal Serial Bus) connector. Laptops use internal connectors.

最后

无论是通过电缆还是无线方式,键盘发出的信号 由计算机的键盘控制器监视.这是一 集成电路(IC),用于处理来自以下设备的所有数据 键盘并将其转​​发到操作系统.当...的时候 通知操作系统(OS) 键盘,它检查键盘数据是否为系统级 命令.一个很好的例子是Windows上的Ctrl-Alt-Delete 计算机,它会重新启动系统.然后,操作系统通过键盘 数据存储到当前应用程序.

Whether it's through a cable or wireless, the signal from the keyboard is monitored by the computer's keyboard controller. This is an integrated circuit (IC) that processes all of the data that comes from the keyboard and forwards it to the operating system. When the operating system (OS) is notified that there is data from the keyboard, it checks to see if the keyboard data is a system level command. A good example of this is Ctrl-Alt-Delete on a Windows computer, which reboots the system. Then, the OS passes the keyboard data on to the current application.

数据也通过电缆或无线(IR或其他无线技术)发送.

The data is sent via cable or wireless also (IR or other wireless technology).

Wikipedia也有很好的键盘上的文字

Wikipedia also has a nice writeup on keyboards,

计算机键盘包括用于转换按键的控制电路 转换成计算机电子设备可以理解的关键代码.钥匙 开关通过印刷电路板连接到电气中 X-Y矩阵,其中向Y线顺序提供电压 当按下键时,通过扫描X依次检测到 线.

Computer keyboards include control circuitry to convert key presses into key codes that the computer's electronics can understand. The key switches are connected via the printed circuit board in an electrical X-Y matrix where a voltage is provided sequentially to the Y lines and, when a key is depressed, detected sequentially by scanning the X lines.

这篇关于键盘输入如何进入终端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆