[go: up one dir, main page]

CN101246393A - Computer device and keyboard input operation method thereof - Google Patents

Computer device and keyboard input operation method thereof Download PDF

Info

Publication number
CN101246393A
CN101246393A CNA2007100840767A CN200710084076A CN101246393A CN 101246393 A CN101246393 A CN 101246393A CN A2007100840767 A CNA2007100840767 A CN A2007100840767A CN 200710084076 A CN200710084076 A CN 200710084076A CN 101246393 A CN101246393 A CN 101246393A
Authority
CN
China
Prior art keywords
key
keyboard
scan code
function
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2007100840767A
Other languages
Chinese (zh)
Other versions
CN101246393B (en
Inventor
刘丁荣
杨仁宗
陈圣益
杨耀明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Asustek Computer Inc
Original Assignee
Asustek Computer Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Asustek Computer Inc filed Critical Asustek Computer Inc
Priority to CN2007100840767A priority Critical patent/CN101246393B/en
Publication of CN101246393A publication Critical patent/CN101246393A/en
Application granted granted Critical
Publication of CN101246393B publication Critical patent/CN101246393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

一种电脑装置及其键盘输入的操作方法,所述键盘输入的操作方法包括接收一中断请求;读取储存在一扫描码缓存器中的一第一扫描码;判断该第一扫描码是否为代表一功能切换键的一预设扫描码;若该第一扫描码为预设扫描码,读取储存在一事件码缓存器中一事件码;以及根据该事件码执行一对应的服务程序或功能。

Figure 200710084076

A computer device and a keyboard input operation method thereof, the keyboard input operation method comprising receiving an interrupt request; reading a first scan code stored in a scan code buffer; determining whether the first scan code is a preset scan code representing a function switch key; if the first scan code is a preset scan code, reading an event code stored in an event code buffer; and executing a corresponding service program or function according to the event code.

Figure 200710084076

Description

电脑装置及其键盘输入的操作方法 Operation method of computer device and keyboard input thereof

技术领域 technical field

本发明有关键盘输入技术,特别有关一种电脑装置及其键盘输入的操作方法。The invention relates to keyboard input technology, in particular to a computer device and its keyboard input operation method.

背景技术 Background technique

在许多电脑系统(例如:台式电脑)中,是使用键盘作为主要的输入装置,用以输入指令或数据至电脑系统。在此类电脑装置中,键盘是通过一键盘接口(例如:键盘控制器)耦接至处理单元。一般而言,电脑键盘使用网状或矩阵式的开关组件,当所述网状或矩阵式的开关组件中一特定交接处上的一个按键被压下时,内建于键盘中或设置于电脑装置的主机板上的键盘控制器会通过所述网络的位置,来判别出被按压的按键。In many computer systems (eg, desktop computers), the keyboard is used as the main input device for inputting commands or data into the computer system. In such computer devices, the keyboard is coupled to the processing unit through a keyboard interface (eg, a keyboard controller). Generally speaking, a computer keyboard uses a mesh or matrix switch assembly. When a key on a specific junction in the mesh or matrix switch assembly is pressed, a The keyboard controller on the mainboard of the device will determine the pressed key through the location of the network.

然而,随着可携式电脑装置(例如:笔记本电脑或超级移动电脑(UMPC))体积大小的缩减,并且这类电脑装置通常具有许多附加功能,例如:切换显示画面在电脑装置上的屏幕或投影机、调整声音大小、或调整画面的亮度等,然而组设在这类电脑装置上的键盘按键数量通常无法各别支持这些功能。因此现行可携式电脑装置上的键盘通常会设置一功能切换键(Function key;Fn键),使得键盘上的单一按键可以不只具有单一的功能。However, as the size of portable computer devices (for example: notebook computers or ultra mobile computers (UMPC)) shrinks, and such computer devices usually have many additional functions, such as: switching the display screen on the computer device or projector, adjust the volume of the sound, or adjust the brightness of the picture, etc. However, the number of keyboard keys assembled on this type of computer device usually cannot support these functions respectively. Therefore, the keyboard on the existing portable computer device is usually provided with a function switching key (Function key; Fn key), so that a single button on the keyboard can not only have a single function.

举例而言,″Backspace″键原本为清除键,用以清除已输入的文字或数字,但若同时按下Fn键与″Backspace″键将可使得电脑装置的喇叭进入一静音状态。换言之,键盘上的部份按键将可具有两种功能,于单独被按下时,执行一般功能,例如文字输入、清除或更新等等,而与Fn键搭配使用时则可执行一特定的功能。For example, the "Backspace" key is originally a clear key for clearing the input characters or numbers, but if the Fn key and the "Backspace" key are pressed simultaneously, the speaker of the computer device will enter a mute state. In other words, some keys on the keyboard will have two functions. When pressed alone, they can perform general functions, such as text input, clear or update, etc., and can perform a specific function when used in conjunction with the Fn key. .

另外,在这一类的可携式电脑装置中,Fn键通常搭配键盘上的功能键(例如:F1~F12),执行开启键盘锁、开启上网程序、输出影像至投影机、执行影音程序的暂停功能、执行影音程序的快转功能、执行影音程序的反转功能、开启休眠模式、增加屏幕的亮度、降低屏幕的亮度、提高喇叭的音量、减少喇叭的音量、开启静音功能或其它功能,以便在不增加键盘大小的情况下,额外增加按键可控制的功能。In addition, in this type of portable computer device, the Fn key is usually matched with the function keys (for example: F1-F12) on the keyboard to execute the functions of unlocking the keyboard, opening the Internet program, outputting the image to the projector, and executing the audio-visual program. Pause function, execute fast forward function of audio-visual program, execute reverse function of audio-visual program, enable sleep mode, increase screen brightness, decrease screen brightness, increase speaker volume, decrease speaker volume, enable mute function or other functions, In order to increase the additional functions that can be controlled by the keys without increasing the size of the keyboard.

发明内容 Contents of the invention

本发明提供一种键盘输入的操作方法,包括接收一中断请求;读取储存在一扫描码缓存器中的一第一扫描码;判断第一扫描码是否是一预设扫描码;以及若第一扫描码为预设扫描码,读取储存在一事件码缓存器中一事件码,并根据事件码执行一对应的服务程序或功能。The present invention provides an operation method for keyboard input, including receiving an interrupt request; reading a first scan code stored in a scan code buffer; judging whether the first scan code is a preset scan code; and if the first scan code is a default scan code; A scan code is a default scan code, reads an event code stored in an event code register, and executes a corresponding service program or function according to the event code.

本发明还提供一种电脑装置,包括一键盘,具有至少一字母数字键、至少一功能键以及至少一功能切换键(Fn key);一处理单元;一键盘控制器,耦接所述键盘,用以于字母数字键、功能键、功能切换键或其组合键被按下时,使用相同一中断信号,致使处理单元执行一对应的服务程序或功能。The present invention also provides a computer device, comprising a keyboard with at least one alphanumeric key, at least one function key and at least one function switching key (Fn key); a processing unit; a keyboard controller coupled to the keyboard, The same interrupt signal is used to cause the processing unit to execute a corresponding service program or function when an alphanumeric key, a function key, a function switch key or a combination thereof is pressed.

本发明还提供一种电脑装置,包括一键盘,具有至少一字母数字键、至少一功能键以及至少一功能切换键(Fn key);一键盘控制器,耦接键盘,包括一扫描码缓存器以以一事件码缓存器;以及一处理单元,用以于接收到一中断请求后,读取储存在扫描码缓存器中的一第一扫描码,判断第一扫描码是否代表功能切换键的一预设扫描码,若第一扫描码为预设扫描码,读取储存在一事件码缓存器中一事件码,并根据事件码执行一对应的服务程序或功能。The present invention also provides a computer device, including a keyboard, having at least one alphanumeric key, at least one function key, and at least one function switching key (Fn key); a keyboard controller, coupled to the keyboard, including a scan code register With an event code register; and a processing unit, after receiving an interrupt request, read a first scan code stored in the scan code register, and determine whether the first scan code represents the function switching key A default scan code, if the first scan code is the default scan code, read an event code stored in an event code register, and execute a corresponding service program or function according to the event code.

为了让本发明的上述和其它目的、特征、和优点能更明显易懂,下文特举一较佳实施例,并配合所附图示,作详细说明如下:In order to make the above and other objects, features, and advantages of the present invention more comprehensible, a preferred embodiment is specifically cited below, and in conjunction with the attached drawings, the detailed description is as follows:

附图说明 Description of drawings

图1所示为本发明实施例的电脑装置的功能方块图。FIG. 1 is a functional block diagram of a computer device according to an embodiment of the present invention.

图2为一键盘的一示意图。FIG. 2 is a schematic diagram of a keyboard.

图3所表示依据本发明实施例的键盘输入的操作方法的步骤流程图。FIG. 3 shows a flow chart of the steps of the keyboard input operation method according to the embodiment of the present invention.

具体实施方式 Detailed ways

图1所示为本发明实施例的电脑装置的功能方块图。电脑装置100包括处理单元10、北桥芯片11、非挥发性存储器12、存储器单元13、南桥芯片15、显示芯片30、显示单元16、键盘18、总线20、及键盘控制器22,其中存储器单元13还包括随机存取存储器14(Random Access Memory,RAM),南桥芯片15还包括中断控制器24,键盘控制器22还包括扫描码缓存器221以及事件码缓存器223。FIG. 1 is a functional block diagram of a computer device according to an embodiment of the present invention. The computer device 100 includes a processing unit 10, a north bridge chip 11, a non-volatile memory 12, a memory unit 13, a south bridge chip 15, a display chip 30, a display unit 16, a keyboard 18, a bus 20, and a keyboard controller 22, wherein the memory unit 13 also includes a random access memory 14 (Random Access Memory, RAM), the south bridge chip 15 also includes an interrupt controller 24, and the keyboard controller 22 also includes a scan code buffer 221 and an event code buffer 223.

在本实施例中,电脑装置100可为台式电脑装置,服务器,准系统(Barebone),或可携式电脑装置,其中可携式电脑装置包括笔记本电脑(Notebooks),平板型电脑(Tablet PC),掌上型电脑(Palmtops),及超级移动电脑(UMPC)。在本实施例中,所述非挥发性存储器12可为闪存(Flash),在其它实施例中,非挥发性存储器12也可为只读存储器(Read OnlyMemory,ROM)。在本实施例中,显示单元16可为液晶显示面板,在其它实施例中,显示单元16也可为等离子体显示面板,有机电致发光显示面板,场发光显示面板,或阴极射线管显示面板。In this embodiment, the computer device 100 can be a desktop computer device, a server, a barebones system (Barebone), or a portable computer device, wherein the portable computer device includes notebook computers (Notebooks), tablet computers (Tablet PC) , Palmtops, and Ultra Mobile Computers (UMPC). In this embodiment, the non-volatile memory 12 may be a flash memory (Flash), and in other embodiments, the non-volatile memory 12 may also be a read-only memory (Read Only Memory, ROM). In this embodiment, the display unit 16 can be a liquid crystal display panel. In other embodiments, the display unit 16 can also be a plasma display panel, an organic electroluminescence display panel, a field emission display panel, or a cathode ray tube display panel. .

处理单元10与北桥芯片11耦接,且处理单元10可为微处理器(Microprocessor)或中央处理器(Central Processing Unit,CPU)。北桥芯片11分别耦接至处理单元10,南桥芯片15,显示芯片30,及存储器单元13。显示芯片30则耦接至显示单元16。在其它实施例中,显示芯片30也可替换成显示卡。The processing unit 10 is coupled to the north bridge chip 11, and the processing unit 10 can be a microprocessor (Microprocessor) or a central processing unit (Central Processing Unit, CPU). The north bridge chip 11 is respectively coupled to the processing unit 10 , the south bridge chip 15 , the display chip 30 , and the memory unit 13 . The display chip 30 is coupled to the display unit 16 . In other embodiments, the display chip 30 can also be replaced by a display card.

南桥芯片15分别耦接至北桥芯片11,非挥发性存储器12,及键盘控制器22。在其它例子中,南桥芯片15还可耦接至其它电脑辅助设备,例如:磁盘驱动器(Disk Drive),光驱,或打印机。借此,处理单元10可通过北桥芯片11来存取存储器单元13中所储存的数据,且处理单元10亦可通过南桥芯片15来进行非挥发性存储器12以及键盘控制器22相关的操作。The south bridge chip 15 is respectively coupled to the north bridge chip 11 , the non-volatile memory 12 , and the keyboard controller 22 . In other examples, the south bridge chip 15 can also be coupled to other computer auxiliary devices, such as a disk drive, an optical drive, or a printer. Thus, the processing unit 10 can access the data stored in the memory unit 13 through the north bridge chip 11 , and the processing unit 10 can also perform operations related to the non-volatile memory 12 and the keyboard controller 22 through the south bridge chip 15 .

在本实施例中,南桥芯片15通过工业标准结构(Industry StandardArchitecture,ISA)总线耦接至非挥发性存储器12。在本实施例中,键盘控制器22与南桥芯片15之间的总线20可为低接脚数量(Low Pin Count,LPC)总线,在其它实施例中,键盘控制器22与南桥芯片15之间的总线20也可为ISA总线。In this embodiment, the south bridge chip 15 is coupled to the non-volatile memory 12 through an Industry Standard Architecture (ISA) bus. In this embodiment, the bus 20 between the keyboard controller 22 and the south bridge chip 15 can be a low pin count (Low Pin Count, LPC) bus. In other embodiments, the keyboard controller 22 and the south bridge chip 15 The bus 20 between them can also be an ISA bus.

进一步说,南桥芯片15耦接于北桥芯片11与总线20之间,以控制处理单元10与连接至总线20的键盘控制器22间的联系。此外,南桥芯片15中的中断控制器24可通过总线20来接收键盘控制器22的中断信号,例如IRQ1,以便产生对应的中断请求来告知处理单元10与键盘控制器22进行联系。相类似地,南桥芯片15也可通过其它总线(例如:PCI总线,USB总线,SATA总线,或IDE总线)来接收其它电脑辅助设备的中断信号(例如:IRQ0、IRQ2~IRQ15),以产生相对应的中断请求来告知处理单元10与其它电脑辅助设备进行联系。Furthermore, the south bridge chip 15 is coupled between the north bridge chip 11 and the bus 20 to control the connection between the processing unit 10 and the keyboard controller 22 connected to the bus 20 . In addition, the interrupt controller 24 in the south bridge chip 15 can receive the interrupt signal of the keyboard controller 22 through the bus 20 , such as IRQ1 , so as to generate a corresponding interrupt request to notify the processing unit 10 to contact the keyboard controller 22 . Similarly, the south bridge chip 15 can also receive interrupt signals (for example: IRQ0, IRQ2~IRQ15) of other computer auxiliary equipment through other buses (for example: PCI bus, USB bus, SATA bus, or IDE bus), to generate The corresponding interrupt request is used to notify the processing unit 10 to contact other computer auxiliary devices.

所述键盘控制器22是组设在主机板上。值得注意的是,键盘18上的每一个按键具有一相对应的接点开关,且这些接点开关可通过连接线来与键盘控制器22耦接,借此,键盘控制器22可以每隔一段时间(例如:数毫秒)便扫描一次这些接点开关,以判定是否有一个或多个按键被按压而使得其相对应的接点开关产生键盘信号,以使得键盘控制器22可依据不同按键的键盘信号来产生相对应的扫描码(Scan Code)。继而,键盘控制器22会将扫描码储存至扫描码缓存器221,并产生中断信号IRQ1输出至南桥芯片15的中断控制器24。此外,键盘控制器22在键盘18上某些特定键被按下时,会产生对应的事件码(Event Code)储存至事件码缓存器223中。The keyboard controller 22 is assembled on the motherboard. It is worth noting that each key on the keyboard 18 has a corresponding contact switch, and these contact switches can be coupled with the keyboard controller 22 through connecting wires, whereby the keyboard controller 22 can For example: in a few milliseconds) these contact switches are scanned once to determine whether one or more keys are pressed so that the corresponding contact switches generate keyboard signals, so that the keyboard controller 22 can generate keyboard signals according to different keys. The corresponding scan code (Scan Code). Then, the keyboard controller 22 will store the scan code in the scan code register 221 , and generate an interrupt signal IRQ1 to output to the interrupt controller 24 of the south bridge chip 15 . In addition, when some specific keys on the keyboard 18 are pressed, the keyboard controller 22 will generate corresponding event codes (Event Code) and store them in the event code register 223 .

中断控制器24通过多个中断要求信号线,来接收各个电脑周边的中断信号,例如IRQ0~IRQ15,以便产生对应的中断请求来告知处理单元10有其它组件欲进行联系。The interrupt controller 24 receives interrupt signals from various computer peripherals, such as IRQ0-IRQ15, through a plurality of interrupt request signal lines, so as to generate corresponding interrupt requests to notify the processing unit 10 that other components want to communicate.

值得注意的是,在本实施例中,键盘控制器22与中断控制器24仅通过一条中断要求信号线来传输中断信号(例如:中断信号IRQ1)。也就是说,不管键盘18上的一个按键或多个按键被按下,键盘控制器22皆会通过同一条中断要求信号线来传送相同的中断信号至中断控制器24,其中多个按键被按下的情况例如是:功能切换键(Fn键)与单一功能键(例如:F1~F12)被同时按压的情况,或者Fn键与单一字母键被同时按压的情况,或者多个字母数字键(例如:Ctrl键+Alt键+Del键)被同时按压的情况。It should be noted that, in this embodiment, the keyboard controller 22 and the interrupt controller 24 only transmit the interrupt signal (for example, the interrupt signal IRQ1 ) through one interrupt request signal line. That is to say, no matter one key or multiple keys on the keyboard 18 are pressed, the keyboard controller 22 will send the same interrupt signal to the interrupt controller 24 through the same interrupt request signal line, wherein multiple keys are pressed The following situation is, for example: the situation where the function switching key (Fn key) and a single function key (for example: F1-F12) are pressed simultaneously, or the situation where the Fn key and a single letter key are pressed simultaneously, or multiple alphanumeric keys ( For example: Ctrl key + Alt key + Del key) are pressed simultaneously.

当中断控制器24接收到中断信号IRQ1时,中断控制器24会产生一键盘中断请求(Keyboard Interrupt Request)且将其传送至处理单元10。继而,处理单元10送出一确认讯息(Acknowledge)至中断控制器24,以告知中断控制器24处理单元10已收到其所产生的键盘中断请求。接者,处理单元10执行一键盘中断服务程序(Keyboard Interrupt Service Routine,KBSR),让键盘中断服务程序由键盘控制器22取得其所产生的扫描码,以执行相关操作,例如:将扫描码转换成代表使用者所压下的字母数字键的ASCII字符,或者执行所按压的字符所决定的功能。When the interrupt controller 24 receives the interrupt signal IRQ1, the interrupt controller 24 will generate a keyboard interrupt request (Keyboard Interrupt Request) and send it to the processing unit 10. Then, the processing unit 10 sends an acknowledgment message (Acknowledge) to the interrupt controller 24 to inform the interrupt controller 24 that the processing unit 10 has received the generated keyboard interrupt request. Next, the processing unit 10 executes a keyboard interrupt service routine (Keyboard Interrupt Service Routine, KBSR), so that the keyboard interrupt service routine obtains the scan code generated by it from the keyboard controller 22 to perform related operations, for example: convert the scan code into ASCII characters representing the alphanumeric keys pressed by the user, or to perform the function determined by the pressed characters.

一般而言,键盘中断服务程序可以储存在非挥发性存储器12或随机存取存储器14中。在某些实施例中,供键盘18所使用的键盘中断服务程序是基本输入/输出系统(Basic Input/Output System,BIOS)的一部分。Generally speaking, the keyboard interrupt service routine can be stored in the non-volatile memory 12 or the random access memory 14 . In some embodiments, the keyboard interrupt service routine used by keyboard 18 is part of the Basic Input/Output System (BIOS).

图2显示键盘18的示意图。键盘18包括多个传统的字母数字键(alphanumeric Keys)181、多个功能键(Function Keys)182、及功能切换键(Fnkey)183。举例而言,字母数字键181包括英字母键a~z、数字键0~9、Ctrl键、Shift键、Alt键等等,而功能键182至少包括F1~F12键。键盘控制器22耦接至键盘18,以检测这些字母数字键181、功能键182、及功能切换键183是否被使用者所按下。FIG. 2 shows a schematic diagram of the keyboard 18 . The keyboard 18 includes a plurality of traditional alphanumeric keys (alphanumeric Keys) 181, a plurality of function keys (Function Keys) 182, and a function switching key (Fnkey) 183. For example, the alphanumeric keys 181 include alphabet keys a~z, number keys 0~9, Ctrl key, Shift key, Alt key, etc., and the function keys 182 include at least F1~F12 keys. The keyboard controller 22 is coupled to the keyboard 18 to detect whether the alphanumeric keys 181 , function keys 182 , and function switching keys 183 are pressed by the user.

要注意的是,于本发明实施例中,在功能切换键(Fn)183与任一功能键(F1~F12)182时,或功能切换键(Fn)183与任一字母数字键181被按下时,键盘控制器22就会产生一组预设扫描码,在本实施例中,这组预设扫描码例如为E023。在此时,键盘控制器22也会产生一对应的事件码储存于事件码缓存器223中。It should be noted that, in the embodiment of the present invention, when the function switching key (Fn) 183 and any function key (F1-F12) 182, or the function switching key (Fn) 183 and any alphanumeric key 181 are pressed When pressing down, the keyboard controller 22 will generate a set of preset scan codes. In this embodiment, the set of preset scan codes is, for example, E023. At this time, the keyboard controller 22 also generates a corresponding event code and stores it in the event code register 223 .

表一为本发明实施例中事件码与其对应服务程序的对照表。Table 1 is a comparison table between event codes and their corresponding service programs in the embodiment of the present invention.

  事件码 event code   被按下的按键 the key pressed   对应的功能 Corresponding functions   ECD01 ECD01   Fn+F2 Fn+F2   开启上网程序 Open the Internet program   ECD02 ECD02   Fn+F3 Fn+F3   开启键盘锁 Turn on keypad lock   ECD03 ECD03   Fn+F4 Fn+F4   输出影像至投影机 Output image to projector   ECD04 ECD04   Fn+F5 Fn+F5   执行影音程序的暂停功能 Execute the pause function of the audio-visual program   ECD05 ECD05   Fn+F6 Fn+F6   执行影音程序的快转功能 Execute the fast-forward function of audio-visual programs   ECD06 ECD06   Fn+F7 Fn+F7   执行影音程序的反转功能 Execute the reverse function of the audio-visual program   ECD07 ECD07   Fn+F8 Fn+F8   开启休眠模式 Turn on sleep mode   ECD08 ECD08   Fn+F9 Fn+F9   增加屏幕的亮度 Increase the brightness of the screen   ECD09 ECD09   Fn+F10 Fn+F10   降低屏幕的亮度 Reduce the brightness of the screen

  ECD10 ECD10   Fn+F11 Fn+F11   提高啦叭的音量 Raise the volume of the horn   ECD11 ECD11   Fn+F12 Fn+F12   减少啦叭的音量 Reduce the volume of the horn   ECD12 ECD12   Fn+Backspace Fn+Backspace   开启静音功能 Turn on the mute function

表一Table I

举例而言,当Fn键183与功能键182中的F2键被按下时,键盘控制器22会产生预设扫描码E023以及产生一事件码ECD01,代表使用者欲开启(或执行)一上网程序。若为Fn键183与功能键182中的F3键被按下时,键盘控制器22则会产生预设扫描码E023以及产生一对应的事件码ECD02,代表使用者欲开启键盘锁的功能,以将键盘18锁住。或者是说,当Fn键183与功能键182中的F8键被按下时,键盘控制器22则会产生预设扫描码E023以及产生一对应的事件码ECD07,代表使用者欲开启休眠模式以节省电能耗损。值得注意的是,在其它实施例中,当Fn键183与任一字母数字键181被按下时,键盘控制器22亦可产生预设扫描码E023以及产生一相对应的事件码。For example, when the F2 key in the Fn key 183 and the function key 182 is pressed, the keyboard controller 22 will generate a default scan code E023 and generate an event code ECD01, representing that the user wants to open (or execute) an Internet access program. If the F3 key in the Fn key 183 and the function key 182 is pressed, the keyboard controller 22 will generate a default scan code E023 and generate a corresponding event code ECD02, representing that the user wants to open the function of the keyboard lock, so as to Keypad 18 is locked. In other words, when the Fn key 183 and the F8 key of the function keys 182 are pressed, the keyboard controller 22 will generate a default scan code E023 and a corresponding event code ECD07, representing that the user intends to enable the sleep mode to Save power consumption. It should be noted that, in other embodiments, when the Fn key 183 and any alphanumeric key 181 are pressed, the keyboard controller 22 can also generate the default scan code E023 and generate a corresponding event code.

当字母数字键181、功能键182或其组合或热键(Hotkey)被压下时,键盘控制器22会产生对应的扫描码,但不包含预设扫描码E023,表示此时功能切换键(Fn)183未被按下。When the alphanumeric key 181, the function key 182 or a combination thereof or a hotkey (Hotkey) is pressed, the keyboard controller 22 will generate a corresponding scan code, but does not include the preset scan code E023, indicating that the function switching key ( Fn) 183 is not pressed.

图3所表示依据本发明实施例的键盘输入的操作方法的流程图,由处理单元10所执行。于步骤S310,接收一中断请求。于步骤S320,读取储存在扫描码缓存器中的第一扫描码。于步骤S330,判断第一扫描码是否代表功能切换键的预设扫描码。于步骤S340,若第一扫描码为预设扫描码,读取储存在一事件码缓存器中一事件码,以及根据所述事件码执行一对应的服务程序或功能。FIG. 3 shows a flow chart of an operation method for keyboard input according to an embodiment of the present invention, which is executed by the processing unit 10 . In step S310, an interrupt request is received. In step S320, read the first scan code stored in the scan code register. In step S330, it is determined whether the first scan code represents the default scan code of the function switching key. In step S340, if the first scan code is the default scan code, read an event code stored in an event code register, and execute a corresponding service program or function according to the event code.

以下说明本发明实施例的键盘输入的操作方法此方法由处理单元10所执行,请同时参考图1及图2。The operation method of keyboard input according to the embodiment of the present invention will be described below. The method is executed by the processing unit 10 . Please refer to FIG. 1 and FIG. 2 at the same time.

首先,当处理单元10检测到中断控制器24所发出的键盘中断请求后,会执行相对应的键盘中断服务程序。一般而言,中断控制器24可用以根据不同组件发出的中断信号,例如IRQ0~IRQ15,产生不同的中断请求告知处理单元10,而处理单元10就会执行对应的中断服务程序。在本实施例中,当键盘18中有任何一个按键或多个按键被按下时,中断控制器24就会根据键盘控制器22所产生的中断信号IRQ1,发出键盘中断请求告知处理单元10,以便处理单元10执行键盘中断服务程序。First, when the processing unit 10 detects the keyboard interrupt request sent by the interrupt controller 24, it executes the corresponding keyboard interrupt service program. Generally speaking, the interrupt controller 24 can be used to generate different interrupt requests to inform the processing unit 10 according to the interrupt signals sent by different components, such as IRQ0˜IRQ15 , and the processing unit 10 will execute the corresponding interrupt service routine. In this embodiment, when any key or multiple keys are pressed in the keyboard 18, the interrupt controller 24 will send a keyboard interrupt request to the processing unit 10 according to the interrupt signal IRQ1 generated by the keyboard controller 22, So that the processing unit 10 executes the keyboard interrupt service program.

要注意的是,键盘中断请求是中断控制器24检测到键盘控制器22发出的中断信号IRQ1所产生,而中断信号IRQ1是由于键盘控制器22检测到键盘18上的功能切换键(Fn key)183、字母数字键181、功能键(F1~F12)182、功能切换键(Fn key)183与字母数字键181的组合、或功能切换键(Fn key)183与功能键182的组合被按下时所产生。It should be noted that the keyboard interrupt request is generated by the interrupt controller 24 detecting the interrupt signal IRQ1 sent by the keyboard controller 22, and the interrupt signal IRQ1 is due to the keyboard controller 22 detecting the function switching key (Fn key) on the keyboard 18 183. Alphanumeric keys 181, function keys (F1-F12) 182, combination of function switching key (Fn key) 183 and alphanumeric key 181, or combination of function switching key (Fn key) 183 and function key 182 is pressed produced when.

借此键盘中断服务程序可先以读取储存在键盘控制器22中扫描码缓存器221中的扫描码,并呼叫一个过滤程序(FP)来判断这个扫描码是否为本实施例中的预设扫描码。在本实施例中,过滤程序可储存在电脑装置100的磁盘驱动器(Disk Drive)或BIOS中。于本发明较佳实施例中,预设扫描码代表于功能切换键(Fn key)183或其与键盘18上其它按键的组合被使用者压下所产生的扫描码。举例而言,预设扫描码可为E023,但不限定于此。In this way, the keyboard interrupt service program can first read the scan code stored in the scan code register 221 in the keyboard controller 22, and call a filter program (FP) to determine whether the scan code is the default in this embodiment scan code. In this embodiment, the filtering program can be stored in a disk drive (Disk Drive) or BIOS of the computer device 100 . In a preferred embodiment of the present invention, the default scan code represents the scan code generated when the function switching key (Fn key) 183 or its combination with other keys on the keyboard 18 is pressed by the user. For example, the default scan code may be E023, but not limited thereto.

当过滤程序判断出目前的扫描码为预设扫描码(E023)时,过滤程序则会读取储存在键盘控制器22中事件码缓存器223的事件码,以使得电脑装置100中的BIOS或应用程序可以根据所取得的事件码执行一对应的服务程序(或功能)。When the filter program judges that the current scan code is the default scan code (E023), the filter program will read the event code stored in the event code register 223 in the keyboard controller 22, so that the BIOS in the computer device 100 or The application program can execute a corresponding service program (or function) according to the obtained event code.

举例而言,如表一示所示,假设所读取到的事件码为ECD01,代表功能切换键(Fn)183与功能键F2被使用者所按下,电脑装置100则会执行一服务程序,以开启(或执行)上网程序。For example, as shown in Table 1, assuming that the read event code is ECD01, it means that the function switching key (Fn) 183 and the function key F2 are pressed by the user, and the computer device 100 will execute a service program to open (or execute) the Internet access program.

换言之,电脑装置100中的BIOS可以根据所读到的事件码,选择性地执行一对应的服务程序,以便开启键盘锁、开启上网程序、输出影像至投影机、执行影音程序的暂停功能、执行影音程序的快转功能、执行影音程序的反转功能、开启休眠模式、增加屏幕的亮度、降低屏幕的亮度、提高啦叭的音量、减少啦叭的音量、开启静音功能或其它功能。In other words, the BIOS in the computer device 100 can selectively execute a corresponding service program according to the read event code, so as to open the keypad lock, open the Internet access program, output images to the projector, execute the pause function of the audio-visual program, execute The fast-forwarding function of the audio-visual program, the reverse function of executing the audio-visual program, enabling the sleep mode, increasing the brightness of the screen, reducing the brightness of the screen, increasing the volume of the speaker, reducing the volume of the speaker, enabling the mute function or other functions.

若过滤程序判断出所读取的扫描码不是预设扫描码(E023)时,则键盘中断服务程序执行被按压所相对应的功能,例如:将键盘中断服务程序所取得的扫描码转换成代表使用者所压下的字母数字键的ASCII字符,或者执行所压下的字符所决定的功能。If the filter program judges that the read scan code is not the default scan code (E023), the keyboard interrupt service program executes the function corresponding to being pressed, for example: convert the scan code obtained by the keyboard interrupt service program into a representative use or the ASCII character of the alphanumeric key pressed, or perform the function determined by the pressed character.

另外,值得一提的是,无论是键盘中断服务程序或是过滤程序在执行相关操作时,其相关操作仍需要通过处理单元10来进行相关运算。因此,在本发明较佳实施例的说明中,也可说处理单元10判断键盘控制器22中的扫描码是否为功能切换键的预设扫描码,若键盘控制器22中的扫描码是预设扫描码,则处理单元10读取储存在事件码缓存器223中的事件码,且处理单元10可根据事件码执行一对应的服务程序或功能。In addition, it is worth mentioning that, whether it is the keyboard interrupt service program or the filter program performing related operations, the related operations still need to be performed by the processing unit 10 for related operations. Therefore, in the description of the preferred embodiment of the present invention, it can also be said that the processing unit 10 judges whether the scan code in the keyboard controller 22 is the preset scan code of the function switch key, if the scan code in the keyboard controller 22 is the preset scan code If the code is scanned, the processing unit 10 reads the event code stored in the event code register 223, and the processing unit 10 can execute a corresponding service program or function according to the event code.

虽然本发明已以较佳实施例揭示如上,然而其并非用以限定本发明,任何熟悉本技术的人员在不脱离本发明的精神和范围内,当可作出种种等同的改变或替换,因此本发明的保护范围当视权利要求书所界定的为准。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person familiar with the art may make various equivalent changes or substitutions without departing from the spirit and scope of the present invention. Therefore, this The scope of protection of the invention should be defined by the claims.

Claims (14)

1. the method for operating of a keyboard input is characterized in that, comprises the steps:
Receive an interrupt request;
Read one first scan code that is stored in the one scan sign indicating number buffer;
Judge whether described first scan code is a default scan code; And
If described first scan code is described default scan code, reads an event code that is stored in the event code buffer, and carry out the service routine or the function of a correspondence according to described event code.
2. method of operating as claimed in claim 1 is characterized in that, described first scan code is produced when being pressed by the combination of other button on a function switch key or itself and the keyboard.
3. method of operating as claimed in claim 1 is characterized in that, described interrupt request is produced when detecting a look-at-me by a South Bridge chip.
4. method of operating as claimed in claim 3 is characterized in that, described look-at-me is that a function switch key is pressed, produces when a function key is pressed, an alphanumeric key is pressed or wherein the two is pressed on detecting a keyboard.
5. method of operating as claimed in claim 1, it is characterized in that, when a function switch key and a function key or an alphanumeric key simultaneously by when being pressed, store described first scan code to described scan code buffer, and store described event code to described event code buffer.
6. a computer installation is characterized in that, comprising:
One keyboard has at least one alphanumeric key, at least one function key, reaches at least one function switch key;
One processing unit; And
One keyboard controller couples described keyboard, with when described alphanumeric key, described function key, described function switch key or its Macintosh are pressed, produces mutually same look-at-me, causes described processing unit to carry out the service routine or the function of a correspondence.
7. computer installation as claimed in claim 6, it is characterized in that, also comprise a South Bridge chip, be coupled between described processing unit and the described keyboard controller, when receiving described look-at-me, the keyboard interrupt request that produces causes described processing unit to carry out the service routine or the function of described correspondence.
8. computer installation as claimed in claim 7, it is characterized in that, described processing unit is after receiving described interrupt request, read one first scan code that is stored in the one scan sign indicating number buffer, judge whether described first scan code is a default scan code of the described function switch key of representative, if described first scan code is described default scan code, reads and be stored in an event code in the event code buffer, and carry out the service routine or the function of a correspondence according to described event code.
9. a computer installation is characterized in that, comprising:
One keyboard has at least one alphanumeric key, at least one function key and at least one function switch key;
One keyboard controller couples described keyboard, comprises that one scan sign indicating number buffer is with an event code buffer;
One processing unit, after being used to receive an interrupt request, read one first scan code that is stored in the described scan code buffer, judge whether described first scan code is a default scan code of the described function switch key of representative, if described first scan code is described default scan code, read and be stored in an event code in the event code buffer, and carry out the service routine or the function of a correspondence according to described event code.
10. computer installation as claimed in claim 9 is characterized in that, when described keyboard controller is pressed in described function switch key, produces described first scan code and is stored to described scan code buffer.
11. computer installation as claimed in claim 10 is characterized in that, described keyboard controller is in detecting described function switch key, described function key, producing described look-at-me when an alphanumeric key is pressed or wherein the two is pressed.
12. computer installation as claimed in claim 11, it is characterized in that, described keyboard controller is simultaneously by when being pressed in described function switch key and described function key or described alphanumeric key, store described first scan code to described scan code buffer, and store described event code to described event code buffer.
13. computer installation as claimed in claim 9 is characterized in that, comprises that also an interruptable controller is in order to produce described interrupt request according to described look-at-me.
14. computer installation as claimed in claim 13 is characterized in that, described interruptable controller is arranged in the South Bridge chip.
CN2007100840767A 2007-02-15 2007-02-15 Operation method of computer device and keyboard input thereof Active CN101246393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007100840767A CN101246393B (en) 2007-02-15 2007-02-15 Operation method of computer device and keyboard input thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007100840767A CN101246393B (en) 2007-02-15 2007-02-15 Operation method of computer device and keyboard input thereof

Publications (2)

Publication Number Publication Date
CN101246393A true CN101246393A (en) 2008-08-20
CN101246393B CN101246393B (en) 2011-06-01

Family

ID=39946871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007100840767A Active CN101246393B (en) 2007-02-15 2007-02-15 Operation method of computer device and keyboard input thereof

Country Status (1)

Country Link
CN (1) CN101246393B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064526A (en) * 2011-10-24 2013-04-24 研祥智能科技股份有限公司 Keyboard locking and unlocking method, system and keyboard
CN104866114A (en) * 2014-02-24 2015-08-26 联想(北京)有限公司 Hardware button control method and device and electronic equipment
TWI745961B (en) * 2020-05-11 2021-11-11 宏碁股份有限公司 Electronic apparatus and key function switching method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030201980A1 (en) * 2002-04-26 2003-10-30 Wang Chin Ping Apparatus for inputting special character and method for the same
CN2676282Y (en) * 2003-08-29 2005-02-02 纬创资通股份有限公司 Notebook computer

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064526A (en) * 2011-10-24 2013-04-24 研祥智能科技股份有限公司 Keyboard locking and unlocking method, system and keyboard
CN103064526B (en) * 2011-10-24 2018-04-20 研祥智能科技股份有限公司 A kind of keyboard adds unlocking method, system and keyboard
CN104866114A (en) * 2014-02-24 2015-08-26 联想(北京)有限公司 Hardware button control method and device and electronic equipment
CN104866114B (en) * 2014-02-24 2017-12-29 联想(北京)有限公司 A kind of hardware button control method, device and electronic equipment
TWI745961B (en) * 2020-05-11 2021-11-11 宏碁股份有限公司 Electronic apparatus and key function switching method thereof

Also Published As

Publication number Publication date
CN101246393B (en) 2011-06-01

Similar Documents

Publication Publication Date Title
US20080198044A1 (en) Computer and method for processing keyboard input thereof
JP6055961B2 (en) Text selection and input
US7768503B2 (en) Capacitive touchpad integrated with a graphical input function
US20080055256A1 (en) Touch screen controller with embedded overlay
US20140152575A1 (en) Mobile electronic device and recording medium
US20100265209A1 (en) Power reduction for touch screens
CN101799719B (en) Keyboard and mouse switcher and switching method thereof
US8694885B2 (en) Keyboard input method and assistant system thereof
CN103207698B (en) Touch display, method for switching operation mode of touch display and computer system
US20080238728A1 (en) Electronic apparatus and key pressing determination method
CN102063190A (en) Method and device for switching character input modes
US20200042128A1 (en) Electronic whiteboard system, operating method thereof and electronic whiteboard
CN101246393B (en) Operation method of computer device and keyboard input thereof
US20190012057A1 (en) Electronic devices and methods for gernerating displayed image
CN101963852A (en) Touch electronic device and related control method
US20120019537A1 (en) Methods and apparatuses for statistically sorting characters for multi-tap keyboards
CN102681752A (en) Electronic device and control method thereof
CN102707811B (en) A kind of method and system of Chinese charater input
TWI709876B (en) Electronic device and switch method and system for inputting
CN104142754A (en) Button module and its signal generating method
WO2016188203A1 (en) Character input method and apparatus, and computer storage medium
US20200050314A1 (en) Touch sensing method, electronic device and non-transitory computer readable recording medium device
US20080074294A1 (en) System for controlling keyboard
CN102467338A (en) Electronic device and key display method of software keyboard thereof
CN105988946A (en) Input interface device of mobile device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant