我们从preSS键盘上的一个键的那一刻会发生什么,直到它出现在Word文档中 [英] What happens from the moment we press a key on the keyboard, until it appears in your word document
本文介绍了我们从preSS键盘上的一个键的那一刻会发生什么,直到它出现在Word文档中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这个问题是在我的面试。我只是为了看看我是否给了所有的细节...
This question was in my job interview.. I just to see whether I gave all the details...
推荐答案
- 机械开关短路电阻R1最终拉至地面
- 一个特殊的多路复用器将其转换为一个消息,以减少导线的数量
- 的消息间$ P $由嵌在键盘CPU PTED
- 消息转换为USB协议消息,并调制成零和5伏之间的一系列交流电压的电脉冲的
- USB集线器接收样的措施线路电压周期
- 主机集线器控制器转换消息数据
- 数据进入PC直通USB总线控制器,连接到PCIE总线,直通IRQ notificaitons的组合,DMA传输,由公交车司机发出
- 总线驱动器间$ P $点的消息,并将其转发沿着驱动程序堆栈,最终以一个HID驱动
- HID驱动程序与窗口,最终导致属于MSWORD过程 发送到一个窗口一个窗口消息
- WM_KEYDOWN由DefWindowProc函数转换为WM_CHAR()。虽然键被按下,多WM_CHARs可以创建。
- Word应用程序捕获WM_CHAR另一个字符添加到文档模型和用户界面的问题,重新渲染
- UI渲染引擎通过加载相应的字体转换UNI code $ C $连接点,以图形图像
- 图形引擎计算整个区域避免闪烁的新形象,并把它逐像素的屏幕
- mechanical switch short-circuits pull up R1 resistor end to the ground
- a special multiplexor translates it into a message, to reduce the number of wires
- the message interpreted by a CPU embedded in the keyboard
- message translated to a USB protocol message, and modulated as a series of electric impulses of alternating voltage between zero and 5 volts
- USB receiving hub measures samples line voltage periodically
- host hub controller translates the message to data
- data enters PC thru USB bus controller, connected to PCIE bus, thru a combination of IRQ notificaitons and a DMA transfer, issued by the bus driver
- Bus driver interprets the message and forwards it along the driver stack, ultimately to an HID driver
- HID driver talks to windows, ultimately resulting in a window message sent to a window belonging to msword process
- WM_KEYDOWN is translated to WM_CHAR by DefWindowProc(). While key is down, multiple WM_CHARs may be created.
- Word application catches WM_CHAR to add another character to the document model and issue re-rendering of UI
- UI rendering engine translates unicode codepoint to graphical image by loading respective font
- graphics engine computes the new image of the whole area to avoid flicker, and puts it pixel-by-pixel to the screen
这篇关于我们从preSS键盘上的一个键的那一刻会发生什么,直到它出现在Word文档中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文