JP2014056436A - Control method of keyboard - Google Patents

Control method of keyboard Download PDF

Info

Publication number
JP2014056436A
JP2014056436A JP2012200904A JP2012200904A JP2014056436A JP 2014056436 A JP2014056436 A JP 2014056436A JP 2012200904 A JP2012200904 A JP 2012200904A JP 2012200904 A JP2012200904 A JP 2012200904A JP 2014056436 A JP2014056436 A JP 2014056436A
Authority
JP
Japan
Prior art keywords
keyboard
state
time
information
control microcomputer
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.)
Pending
Application number
JP2012200904A
Other languages
Japanese (ja)
Inventor
Katsuji Deura
勝司 出浦
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.)
Fujitsu Component Ltd
Original Assignee
Fujitsu Component Ltd
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 Fujitsu Component Ltd filed Critical Fujitsu Component Ltd
Priority to JP2012200904A priority Critical patent/JP2014056436A/en
Publication of JP2014056436A publication Critical patent/JP2014056436A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a control method of a keyboard which can remove influences by chattering in key switches and accurately detect the number of times the key switches are pressed.SOLUTION: In a control method of a keyboard in the keyboard for inputting information to a computer which performs processing, the keyboard has a control microcomputer for transmitting to the computer information to the effect that key switches are in an on-state when, in the key switches on the keyboard, the on-state is detected again after the lapse of a first setup time after the on-state is detected. In the case that the information transmitted by the control microcomputer to the effect that the key switches are in the on-state is received, and the information to the effect that they are in the on-state again after the information to the effect that the switches are in the on-state is received and before a second set up time passes, the information to the effect that the switches are again in the on-state is not used as information to be processed in the computer.

Description

本発明は、キーボードの制御方法に関する。   The present invention relates to a keyboard control method.

コンピュータ等における情報入力機器の一つとして、キーボードが用いられている。このようなキーボードにおいては、一般的に制御マイコン等が設けられており、キー入力のチャタリングを防止するため、例えば、キーが押し下げられているか、キースキャンを行いキーが押し下げられている場合、所定時間が経過した後に、再び押し下げられているキーが先のキースキャンのときと同一キーであった場合に、キー入力ありと判断する方法等がとられている。   A keyboard is used as one of information input devices in a computer or the like. In such a keyboard, a control microcomputer or the like is generally provided, and in order to prevent chattering of key input, for example, when a key is depressed or a key scan is performed and a key is depressed, After a lapse of time, a method of determining that there is a key input or the like is used when the key pressed down again is the same key as in the previous key scan.

特開平1−159718号公報JP-A-1-159718 特開2006−11557号公報JP 2006-11557 A

ところで、上述した所定の時間としては、一般には、キースイッチのデバウンス時間として約10msの時間が設定されている。しかしながら、キーボードにおけるキースイッチの構造等の複雑化や低価格化、更には、大型化等により、約10msの時間では、キースイッチにおいて発生したチャタリングにより、誤ってキースイッチが2度押されたものと判断されてしまう場合がある。   By the way, as the predetermined time described above, generally, a time of about 10 ms is set as a debounce time of the key switch. However, the key switch is accidentally pressed twice due to chattering that occurred in the key switch in the time of about 10 ms due to the complexity of the key switch structure in the keyboard, the price reduction, and the increase in size. May be judged.

本発明は、上記に鑑みてなされたものであり、キースイッチにおけるチャタリングによる影響を取り除き、キースイッチが押された回数を正確に検出することが可能なキーボードの制御方法を提供することを目的とするものである。   The present invention has been made in view of the above, and an object of the present invention is to provide a keyboard control method capable of accurately detecting the number of times the key switch is pressed by removing the influence of chattering in the key switch. To do.

本発明の一観点によれば、処理を行なうコンピュータに情報を入力するためのキーボードにおけるキーボードの制御方法において、前記キーボードには、前記キーボードにおけるキースイッチにおいて、オン状態を検出した後、第1の設定時間経過後に再度オン状態を検出した場合に、オン状態である旨を前記コンピュータに送信する制御マイコンを有しており、前記制御マイコンから送信されたオン状態である旨の情報を受信し、前記オン状態である旨の情報を受信した後、第2の設定時間を経過する前に、再度オン状態である旨の情報を受信した場合には、再度オン状態である旨の情報は、前記コンピュータにおける処理の情報としては用いないことを特徴とする。   According to an aspect of the present invention, in a keyboard control method for a keyboard for inputting information to a computer that performs processing, the keyboard includes a first switch after detecting an on state in a key switch of the keyboard. When it detects the ON state again after the set time has elapsed, it has a control microcomputer that transmits to the computer that it is in the ON state, receives the information that the ON state is transmitted from the control microcomputer, After receiving the information indicating that the device is in the on state, if the information indicating that the device is in the on state is received again before the second set time has elapsed, the information indicating that the device is in the on state is It is not used as processing information in a computer.

本発明によれば、キースイッチにおけるチャタリングによる影響を取り除き、キースイッチが押された回数を正確に検出することが可能なキーボードの制御方法を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the control method of the keyboard which can remove the influence by chattering in a key switch and can detect the frequency | count that the key switch was pushed correctly can be provided.

本実施の形態におけるキーボードの制御方法に用いられるキーボード及びコンピュータKeyboard and computer used for keyboard control method in the present embodiment キーボードにおけるキースイッチの構造図Key switch structure diagram of keyboard キーボードドライバーソフトにおける動作の説明図Illustration of operation in keyboard driver software キースイッチにおける出力の説明図Explanatory drawing of output in key switch 制御マイコンにおける出力の説明図Explanation of output in control microcomputer キーボードドライバーソフトから送信される情報の説明図Illustration of information sent from the keyboard driver software

本発明を実施するための形態について、以下に説明する。尚、同じ部材等については、同一の符号を付して説明を省略する。   The form for implementing this invention is demonstrated below. In addition, about the same member etc., the same code | symbol is attached | subjected and description is abbreviate | omitted.

最初に、本実施の形態におけるキーボードの制御方法に用いられるコンピュータ及びキーボード等について説明する。具体的には、図1に示されるように、コンピュータ10にはキーボード20が接続されており、キーボード20を操作することにより、コンピュータ10に情報入力がなされる。キーボード20には、図2に示されるような、キー入力するためのキースイッチ21が複数設けられており、キースイッチ21を押下することにより入力された情報は、制御マイコン22を介しコンピュータ10に入力される。この際、制御マイコン22では、例えば、約10ms毎にキースイッチ21においてサンプリング等を行なうことにより、チャタリングの発生を防いでいる。尚、本実施の形態では、制御マイコン22において、サンプリング等を行なう時間の間隔を第1の設定時間と記載する場合がある。また、本願においては、キーボードのキースイッチ21におけるチャタリングをデバウンスと記載する場合がある。   First, a computer, a keyboard, and the like used in the keyboard control method in this embodiment will be described. Specifically, as shown in FIG. 1, a keyboard 20 is connected to the computer 10, and information is input to the computer 10 by operating the keyboard 20. The keyboard 20 is provided with a plurality of key switches 21 for key input as shown in FIG. 2, and information input by pressing the key switch 21 is sent to the computer 10 via the control microcomputer 22. Entered. At this time, the control microcomputer 22 prevents chattering from occurring, for example, by performing sampling or the like in the key switch 21 every about 10 ms. In the present embodiment, the control microcomputer 22 may describe the time interval for sampling and the like as the first set time. Further, in the present application, chattering in the key switch 21 of the keyboard may be described as debounce.

コンピュータ10内には、ユーザアプリケーション11を有しており、キーボード20から、キーボードドライバーソフト12を介して情報が入力される。また、後述するキーボードドライバーソフト12における第2の設定時間を設定するための時間設定ソフト13も有している。尚、本実施の形態においては、キーボードドライバーソフト12は、制御マイコンで22では取り除くことのできなかったチャタリングを取り除く機能を有している。   The computer 10 has a user application 11, and information is input from the keyboard 20 via the keyboard driver software 12. Further, it also has time setting software 13 for setting a second setting time in keyboard driver software 12 described later. In this embodiment, the keyboard driver software 12 has a function of removing chattering that could not be removed by the control microcomputer 22.

具体的に、キーボードドライバーソフト12の動作について図3に基づき説明する。尚、本実施の形態においては、前述したように、制御マイコン22を介してキーボードドライバーソフト12に情報が入力される。   Specifically, the operation of the keyboard driver software 12 will be described with reference to FIG. In this embodiment, as described above, information is input to the keyboard driver software 12 via the control microcomputer 22.

最初に、ステップ102(S102)に示されるキーボード10からの情報待ち(コード待ち)の状態から、キーボードドライバーソフト12が、制御マイコン22からの情報(コード)を受信すると、ステップ104(S104)に示されるように、所定の時間内に、同じオンコードが受信されたか否かが判断される。尚、この際の所定の時間を第2の設定時間と記載する。キーボードドライバーソフト12において、第2の設定時間内に同じオンコードが受信された場合には、ステップ106に移行する。一方、キーボードドライバーソフト12において、第2の設定時間内に同じオンコードが受信されなかった場合には、ステップ108に移行する。   First, when the keyboard driver software 12 receives information (code) from the control microcomputer 22 from the state of waiting for information (waiting for code) from the keyboard 10 shown in step 102 (S102), the process proceeds to step 104 (S104). As shown, it is determined whether the same on-code has been received within a predetermined time. The predetermined time at this time is described as a second set time. If the keyboard driver software 12 receives the same on code within the second set time, the process proceeds to step 106. On the other hand, if the keyboard driver software 12 does not receive the same on code within the second set time, the process proceeds to step 108.

次に、ステップ106(S106)では、受信されたコードはユーザアプリケーション11には送信されることはなく無視された後、ステップ102に移行する。一方、ステップ108(S108)では、受信されたコードがユーザアプリケーション11に送信された後、ステップ102に移行する。   Next, in step 106 (S106), the received code is not transmitted to the user application 11, but is ignored. On the other hand, in step 108 (S108), after the received code is transmitted to the user application 11, the process proceeds to step 102.

次に、本実施の形態におけるキーボードの制御方法について、図4〜図6に基づき、より詳細に説明する。図4は、キーボード20のキースイッチ21からの出力を示すものであり、ハイの状態がオフ状態、ローの状態がオン状態を示す。図5は、制御マイコン22からの出力を示すものであり、図6は、キーボードドライバーソフト12からの出力を示すものである。   Next, a keyboard control method according to the present embodiment will be described in more detail with reference to FIGS. FIG. 4 shows an output from the key switch 21 of the keyboard 20, where a high state indicates an off state and a low state indicates an on state. FIG. 5 shows the output from the control microcomputer 22, and FIG. 6 shows the output from the keyboard driver software 12.

最初に、時間aにおいて、キースイッチ21が押されると、キースイッチ21においてオン状態となり、制御マイコン22においてオン状態であることが認識される。   First, when the key switch 21 is pressed at time a, the key switch 21 is turned on, and the control microcomputer 22 recognizes that it is on.

次に、時間aより第1の設定時間が経過した時間bにおいて、キースイッチ21がオン状態となっていると、制御マイコン22において再度オン状態であることが認識され、制御マイコン22においてオン状態であることが確定され、この情報は、キーボードドライバーソフト12に送信される。この際、図4に示されるように、キースイッチ21では、時間aと時間bとの間において、一端オフ状態となるチャタリングが発生していても、制御マイコン22により、このチャタリングを取り除くことができる。この後、キーボードドライバーソフト12に送信されたオンコードは、ステップ104における判断により、ステップ108における受信されたコードをアプリケーションに送信される処理がなされる。即ち、ユーザアプリケーション11にオンコードが送信される。   Next, when the key switch 21 is in the on state at the time b when the first set time has elapsed from the time a, the control microcomputer 22 recognizes that the key switch 21 is in the on state again, and the control microcomputer 22 is in the on state. And this information is transmitted to the keyboard driver software 12. At this time, as shown in FIG. 4, in the key switch 21, even if chattering that is in an off state occurs between time a and time b, the chattering can be removed by the control microcomputer 22. it can. Thereafter, the on-code transmitted to the keyboard driver software 12 is subjected to processing for transmitting the received code in step 108 to the application based on the determination in step 104. That is, an on code is transmitted to the user application 11.

次に、時間bより第1の設定時間が経過した時間cにおいて、キースイッチ21がオフ状態となっていると、制御マイコン22においてオフ状態であることが認識され、制御マイコン22においてオフ状態であることが確定され、この情報は、キーボードドライバーソフト12に送信される。この後、キーボードドライバーソフト12に送信されたオフコードは、ステップ104における判断により、ステップ108における受信されたコードをアプリケーションに送信される処理がなされる。即ち、ユーザアプリケーション11にオフコードが送信される。   Next, when the key switch 21 is in the off state at the time c when the first set time has elapsed from the time b, the control microcomputer 22 recognizes that the key switch 21 is in the off state, and the control microcomputer 22 is in the off state. This information is confirmed and this information is transmitted to the keyboard driver software 12. Thereafter, the off code transmitted to the keyboard driver software 12 is subjected to processing for transmitting the received code in step 108 to the application based on the determination in step 104. That is, an off code is transmitted to the user application 11.

次に、時間cより第1の設定時間が経過した時間dにおいて、キースイッチ21がオン状態となっていると、制御マイコン22においてオン状態であることが認識される。   Next, when the key switch 21 is in the on state at the time d when the first set time has elapsed from the time c, the control microcomputer 22 recognizes that the key switch 21 is in the on state.

次に、時間dより第1の設定時間が経過した時間eにおいて、キースイッチ21がオン状態となっていると、制御マイコン22において再度オン状態であることが認識され、制御マイコン22においてオン状態であることが確定され、この情報は、キーボードドライバーソフト12に送信される。この後、キーボードドライバーソフト12に送信されたオンコードは、ステップ104において、時間bから時間eまでの間の時間が第2の設定時間以内であるか否かが判断され、時間bから時間eまでの間の時間が第2の設定時間以内である場合には、ステップ106における受信されたコードを無視する処理がなされる。即ち、この場合には、ユーザアプリケーション11にはオンコードが送信されない。   Next, when the key switch 21 is turned on at the time e when the first set time has elapsed from the time d, the control microcomputer 22 recognizes that the key switch 21 is turned on again, and the control microcomputer 22 turns on the state. And this information is transmitted to the keyboard driver software 12. Thereafter, the on-code transmitted to the keyboard driver software 12 is determined in step 104 as to whether or not the time between time b and time e is within the second set time, and from time b to time e. If the time until is within the second set time, the received code in step 106 is ignored. That is, in this case, an on code is not transmitted to the user application 11.

次に、時間eから任意の時間が経過した時間fにおいて、キースイッチ21がオフ状態となっていると、制御マイコン22においてオフ状態であることが認識され、制御マイコン22においてオフ状態であることが確定され、この情報は、キーボードドライバーソフト12に送信される。この後、キーボードドライバーソフト12に送信されたオフコードは、ステップ104における判断により、ステップ108における受信されたコードをアプリケーションに送信される処理がなされる。即ち、ユーザアプリケーション11にオフコードが送信される。しかしながら、ユーザアプリケーション11においては、既に、時間cにおいてオフコードを受信しているため、ユーザアプリケーション11においては、特に、情報入力がなされることはない。   Next, when the key switch 21 is in an off state at a time f when an arbitrary time has elapsed from the time e, the control microcomputer 22 recognizes that the key switch 21 is in an off state, and the control microcomputer 22 is in an off state. And this information is transmitted to the keyboard driver software 12. Thereafter, the off code transmitted to the keyboard driver software 12 is subjected to processing for transmitting the received code in step 108 to the application based on the determination in step 104. That is, an off code is transmitted to the user application 11. However, since the user application 11 has already received the off code at the time c, the user application 11 does not particularly input information.

このように、キースイッチ21においては、図4に示されるように、一端オン状態となった後、2回オフ状態となるチャタリングが発生しているが、制御マイコン22において、図5に示されるように、キースイッチ21におけるチャタリングのうち、1回のオフ状態となるチャタリングを取り除くことができる。しかしながら、残りの1回のオフ状態となるチャタリングについては、制御マイコン22では取り除くことができない。本実施の形態においては、図6に示されるように、キーボードドライバーソフト12により、残りの1回のオフ状態となるチャタリングを取り除くことができ、制御マイコン22においてチャタリングを取り除くために設定された第1の設定時間よりも時間の長いチャタリングが発生した場合においても、このようなチャタリングを取り除くことができる。   Thus, in the key switch 21, as shown in FIG. 4, chattering that is turned off twice occurs after being turned on once, but in the control microcomputer 22, it is shown in FIG. 5. As described above, chattering in the key switch 21 that is turned off once can be eliminated. However, the control microcomputer 22 cannot remove the remaining chattering that is turned off once. In the present embodiment, as shown in FIG. 6, the keyboard driver software 12 can remove the remaining chattering that is turned off once, and the control microcomputer 22 is set to remove chattering. Even when chattering longer than the set time of 1 occurs, such chattering can be removed.

本実施の形態では、キーボードドライバーソフト12における第2の設定時間は、時間設定ソフト13により設定可能であり、上述したように、第2の設定時間は、時間bから時間eまでの時間よりも長い時間となるように設定されている。例えば、時間a〜時間eが一定時間におけるサンプリング、即ち、時間aから時間bまで、時間bから時間cまで、時間cから時間dまで、時間dから時間eまでの間隔は、第1の設定時間であって、一定である場合には、第2の設定時間は、第1の設定時間の3倍よりも長い時間となるように設定されている。また、第2の設定時間については、時間設定ソフト13により、キースイッチ21の形状等に対応させて自由に設定することができる。   In the present embodiment, the second set time in the keyboard driver software 12 can be set by the time setting software 13, and as described above, the second set time is longer than the time from time b to time e. It is set to be a long time. For example, sampling at a fixed time from time a to time e, that is, from time a to time b, from time b to time c, from time c to time d, and from time d to time e, is set to the first setting. If the time is constant, the second set time is set to be longer than three times the first set time. The second set time can be freely set by the time setting software 13 in accordance with the shape of the key switch 21 and the like.

尚、上記においては、キーボードの制御方法として、キーボードを用いた場合について説明したが、タッチパネル等において、キーボードと同様の入力をすることができる装置においても同様に適用することができる。   In the above description, the case where the keyboard is used as the keyboard control method has been described. However, the present invention can be similarly applied to an apparatus capable of performing the same input as the keyboard on a touch panel or the like.

以上、本発明の実施に係る形態について説明したが、上記内容は、発明の内容を限定するものではない。   As mentioned above, although the form which concerns on implementation of this invention was demonstrated, the said content does not limit the content of invention.

10 コンピュータ
11 ユーザアプリケーション
12 キーボードドライバーソフト
13 時間設定ソフト
20 キーボード
21 キースイッチ
22 制御マイコン
10 Computer 11 User application 12 Keyboard driver software 13 Time setting software 20 Keyboard 21 Key switch 22 Control microcomputer

Claims (4)

処理を行なうコンピュータに情報を入力するためのキーボードにおけるキーボードの制御方法において、
前記キーボードには、前記キーボードにおけるキースイッチにおいて、オン状態を検出した後、第1の設定時間経過後に再度オン状態を検出した場合に、オン状態である旨を前記コンピュータに送信する制御マイコンを有しており、
前記制御マイコンから送信されたオン状態である旨の情報を受信し、
前記オン状態である旨の情報を受信した後、第2の設定時間を経過する前に、再度オン状態である旨の情報を受信した場合には、再度オン状態である旨の情報は、前記コンピュータにおける処理の情報としては用いないことを特徴とするキーボードの制御方法。
In a keyboard control method in a keyboard for inputting information to a computer for processing,
The keyboard has a control microcomputer that transmits an on-state to the computer when the on-state is detected again after the first set time has elapsed after the on-state is detected in the key switch of the keyboard. And
Receives information indicating that the control microcomputer is in an ON state,
After receiving the information indicating that the device is in the on state, if the information indicating that the device is in the on state is received again before the second set time has elapsed, the information indicating that the device is in the on state is A method for controlling a keyboard, which is not used as processing information in a computer.
前記第2の設定時間は、前記コンピュータにおける時間設定ソフトにより設定することができるものであることを特徴とする請求項1に記載のキーボードの制御方法。   The keyboard control method according to claim 1, wherein the second set time can be set by time setting software in the computer. 前記制御マイコンは、前記第1の設定時間ごとに、キースイッチにおける状態をサンプリングするものであることを特徴とする請求項1または2に記載のキーボードの制御方法。   3. The keyboard control method according to claim 1, wherein the control microcomputer samples a state of the key switch at each of the first set times. 4. 前記第2の設定時間は、前記第1の設定時間よりも長いことを特徴とする請求項1から3のいずれかに記載のキーボードの制御方法。   4. The keyboard control method according to claim 1, wherein the second set time is longer than the first set time.
JP2012200904A 2012-09-12 2012-09-12 Control method of keyboard Pending JP2014056436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012200904A JP2014056436A (en) 2012-09-12 2012-09-12 Control method of keyboard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012200904A JP2014056436A (en) 2012-09-12 2012-09-12 Control method of keyboard

Publications (1)

Publication Number Publication Date
JP2014056436A true JP2014056436A (en) 2014-03-27

Family

ID=50613695

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012200904A Pending JP2014056436A (en) 2012-09-12 2012-09-12 Control method of keyboard

Country Status (1)

Country Link
JP (1) JP2014056436A (en)

Similar Documents

Publication Publication Date Title
JP2015232895A5 (en)
JP2011090532A5 (en)
CN105516765A (en) Button matching method and device and signal processing method and device of remote controller
CN105303172A (en) Calibration parameter obtaining method and device of fingerprint sensor and mobile terminal
EP3432128B1 (en) Button detection method and device
US10146372B2 (en) Method for controlling blank screen gesture processing and terminal
CN106775284B (en) Information processing method and electronic equipment
MX2015006949A (en) Message sending method and device.
CN104898839A (en) Terminal device and control method thereof
US10942622B2 (en) Splitting and merging files via a motion input on a graphical user interface
CN108513216B (en) Information processing method and wire-controlled earphone
EP3029380A1 (en) Method for performing a treatment by a domestic appliance and for processing information of said treatment by a mobile computer device
CN103984888B (en) A kind of assisting users activates method and the device of the application program of fingerprint binding
CN106919285B (en) Terminal
US10809824B2 (en) Information processing method and electronic device
JP2014056436A (en) Control method of keyboard
US9696793B2 (en) Systems and methods for selectably suppressing computing input events triggered by variable pressure and variable displacement sensors
PH12018502391A1 (en) Application program data processing method and device
US20170010696A1 (en) Input device adaptable to use habit and adapting method therefor
CN102999382A (en) Electronic device and switching method thereof
CN105677176B (en) Information processing method and electronic equipment
CN103558977A (en) Method and device for preventing screen mislocking
WO2009064077A3 (en) Method and apparatus for processing character-input
CN105260097A (en) Operation event processing method and system, and electronic equipment
KR101096572B1 (en) Method and device for inputting on touch screen, and portable device comprising the same