TWI486816B - Method of dynamically adjusting long-press delay time, electronic device, and computer program product thereof - Google Patents

Method of dynamically adjusting long-press delay time, electronic device, and computer program product thereof Download PDF

Info

Publication number
TWI486816B
TWI486816B TW098143238A TW98143238A TWI486816B TW I486816 B TWI486816 B TW I486816B TW 098143238 A TW098143238 A TW 098143238A TW 98143238 A TW98143238 A TW 98143238A TW I486816 B TWI486816 B TW I486816B
Authority
TW
Taiwan
Prior art keywords
time
input
key input
key
electronic device
Prior art date
Application number
TW098143238A
Other languages
Chinese (zh)
Other versions
TW201101119A (en
Inventor
Ching Tung Liu
Original Assignee
Htc Corp
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 Htc Corp filed Critical Htc Corp
Priority to CN2010100045911A priority Critical patent/CN101930295B/en
Priority to US12/702,307 priority patent/US8441377B2/en
Priority to EP10153981A priority patent/EP2267581A1/en
Publication of TW201101119A publication Critical patent/TW201101119A/en
Application granted granted Critical
Publication of TWI486816B publication Critical patent/TWI486816B/en

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Description

動態調整長按延遲時間的方法、電子裝置與電腦程式產品Method for dynamically adjusting long delay time, electronic device and computer program product

本發明是有關於一種電子裝置其長按延遲時間的調整方法,且特別是有關於一種根據電子裝置所接收之鍵盤輸入速度來調整其長按延遲時間的方法、電子裝置及電腦程式產品。The present invention relates to an electronic device having a long delay time adjustment method, and more particularly to a method, an electronic device and a computer program product for adjusting a long press delay time according to a keyboard input speed received by an electronic device.

為維持行動電子裝置輕巧的體積,裝置上的按鍵數量也必須盡可能地精簡。正因如此,每個按鍵往往必須對應一個以上的輸入字元。使用者除了能透過連續按壓同一按鍵以在其所對應的各個輸入字元間進行切換之外,由於大多數的行動電子裝置會支援按鍵的長按功能,因此使用者只要持續按壓一按鍵的按壓時間超過裝置所預設的長按延遲時間,便能直接輸入長按該按鍵所對應的特定輸入字元,或是執行長按該按鍵所對應的特定功能。In order to maintain the compact size of the mobile electronic device, the number of buttons on the device must also be as compact as possible. Because of this, each button often has to correspond to more than one input character. In addition to continuously pressing the same button to switch between the corresponding input characters, the user can support the long press function of the button, so the user only needs to press the button for a continuous press. If the time exceeds the preset delay time of the device, you can directly input the specific input character corresponding to the long press, or perform a long press of the specific function corresponding to the button.

然而預設的長按延遲時間無法配合輸入速度不同的使用者。換句話說,輸入速度較快的使用者可能會覺得預設的長按延遲時間太長,而易產生輸入停頓(typing break);輸入速度較慢的使用者可能會覺得預設的長按延遲時間太短,而易造成輸入錯誤。However, the preset long press delay time cannot match the user with different input speeds. In other words, users with faster input speeds may feel that the preset long press delay time is too long, and it is easy to generate a typing break; users with slower input speed may feel the preset long press delay. The time is too short and it is easy to cause input errors.

有鑑於此,本發明提供一種動態調整長按延遲時間的方法及應用此方法的電子裝置與電腦程式產品,可根據使用者的輸入速度動態地調整長按延遲時間。In view of the above, the present invention provides a method for dynamically adjusting a long press delay time and an electronic device and a computer program product using the same, which can dynamically adjust a long press delay time according to a user input speed.

本發明提出一種動態調整長按延遲時間的方法,用於具有至少一按鍵的電子裝置。當對應於其中之一按鍵的按壓時間大於一長按延遲時間時,電子裝置執行對應於該按鍵的長按功能。在此方法中,首先接收複數個按鍵輸入。接著,依據按鍵輸入速度設定電子裝置的長按延遲時間。The present invention provides a method of dynamically adjusting a long press delay time for an electronic device having at least one button. When the pressing time corresponding to one of the keys is greater than a long pressing delay time, the electronic device performs a long pressing function corresponding to the key. In this method, a plurality of key inputs are first received. Then, the long press delay time of the electronic device is set according to the key input speed.

從另一觀點來看,本發明提出一種電子裝置,其包括至少一按鍵與處理單元。其中,處理單元耦接上述按鍵,當對應於其中之一按鍵的按壓時間大於長按延遲時間時,處理單元便執行對應於按鍵的長按功能。而在接收複數個按鍵輸入時,處理單元則會依據按鍵輸入速度設定電子裝置的長按延遲時間。From another point of view, the present invention provides an electronic device that includes at least one button and processing unit. The processing unit is coupled to the button, and when the pressing time corresponding to one of the buttons is greater than the long pressing delay time, the processing unit performs a long pressing function corresponding to the button. When receiving a plurality of key inputs, the processing unit sets the long press delay time of the electronic device according to the key input speed.

從又一觀點來看,本發明提出一種電腦程式產品,包括用以載入電子裝置的至少一程式指令,上述程式指令在載入電子裝置後,便可執行上述動態調整長按延遲時間的方法。From another point of view, the present invention provides a computer program product, including at least one program command for loading an electronic device, wherein the program command can perform the dynamic adjustment of a long press delay time after loading the electronic device .

本發明另提出一種電子裝置,此電子裝置包括至少一按鍵,當對應於其中之一按鍵的按壓時間大於長按延遲時間時,電子裝置執行對應於該按鍵的長按功能。電子裝置包括按鍵輸入接收手段及長按延遲時間調整手段。按鍵輸入接收手段係用以接收複數個按鍵輸入。長按延遲時間調整手段則是用以依據按鍵輸入速度設定電子裝置的長按延遲時間。The present invention further provides an electronic device including at least one button, and when the pressing time corresponding to one of the buttons is greater than the long pressing delay time, the electronic device performs a long pressing function corresponding to the button. The electronic device includes a button input receiving means and a long press delay time adjusting means. The key input receiving means is for receiving a plurality of key inputs. The long-press delay time adjustment means is used to set the long-press delay time of the electronic device according to the key input speed.

圖1是依照本發明之一實施例所繪示之電子裝置的方塊圖。請參閱圖1,電子裝置100包括至少一個按鍵(如按鍵110a、110b、110c)、處理單元120,以及儲存單元130。其中,電子裝置100可以是手機、個人數位助理(Personal Digital Assistant,PDA)、個人數位助理手機、智慧型手機(smart phone)、電腦、音樂播放器、遊戲裝置、數位相機或其他任何具有至少一按鍵的電子裝置。1 is a block diagram of an electronic device in accordance with an embodiment of the present invention. Referring to FIG. 1 , the electronic device 100 includes at least one button (such as buttons 110 a , 110 b , 110 c ), a processing unit 120 , and a storage unit 130 . The electronic device 100 may be a mobile phone, a personal digital assistant (PDA), a personal digital assistant mobile phone, a smart phone, a computer, a music player, a game device, a digital camera, or any other having at least one The electronic device of the button.

按鍵110a、110b、110c可以是電子裝置100上的實體按鍵或虛擬按鍵。所有的按鍵均耦接至處理單元120,而處理單元120例如是具備運算處理能力的硬體(例如晶片組)、軟體元件、或硬體及軟體元件的組合。儲存單元130耦接處理單元120,可以是記憶體、記憶卡,或任何儲存裝置。The buttons 110a, 110b, 110c may be physical buttons or virtual buttons on the electronic device 100. All of the keys are coupled to the processing unit 120, and the processing unit 120 is, for example, a hardware (eg, a wafer set) having operational processing capabilities, a software component, or a combination of hardware and software components. The storage unit 130 is coupled to the processing unit 120 and may be a memory, a memory card, or any storage device.

在本實施例中,每當對應於任一按鍵的一按壓時間大於長按延遲時間時,處理單元120便會執行對應於該按鍵的長按功能,其中,該按壓時間例如是使用者持續按壓實體按鍵的時間,或是持續接觸電子裝置100之觸碰螢幕上按鍵的時間,或是其他任何持續利用按鍵輸入訊號至電子裝置100之時間。除此之外,當電子裝置100已接收多個按鍵輸入,處理單元120會依據按鍵輸入速度的快慢來調整電子裝置100之長按延遲時間的長短。In this embodiment, each time the pressing time corresponding to any button is greater than the long pressing delay time, the processing unit 120 performs a long pressing function corresponding to the button, wherein the pressing time is, for example, continuous pressing by the user. The time of the physical button, or the time of continuously touching the button on the screen of the electronic device 100, or any other time for continuously inputting the signal to the electronic device 100 by using the button. In addition, when the electronic device 100 has received a plurality of key inputs, the processing unit 120 adjusts the length of the long press delay time of the electronic device 100 according to the speed of the key input speed.

為了判斷按鍵輸入速度,處理單元120首先計算對應於m個按鍵輸入的輸入時間(m為正整數)。當輸入時間小於一臨界時間(threshold time),表示按鍵輸入速度較快,處理單元120因而將長按延遲時間設定為較小之第一預設值。倘若輸入時間大於臨界時間,則表示按鍵輸入速度較慢,因此處理單元120將長按延遲時間設定為較大之第二預設值。In order to determine the key input speed, the processing unit 120 first calculates an input time (m is a positive integer) corresponding to m key inputs. When the input time is less than a threshold time, indicating that the key input speed is faster, the processing unit 120 thus sets the long press delay time to a smaller first preset value. If the input time is greater than the critical time, it means that the key input speed is slow, so the processing unit 120 sets the long press delay time to the second second preset value.

換句話說,一旦處理單元120判斷m個按鍵輸入的輸入時間小於臨界時間,代表使用者的輸入動作已相當熟練,因此處理單元120將縮短電子裝置100的長按延遲時間,以減少輸入停頓對使用者造成的不便。反之,在處理單元120判斷m個按鍵輸入的輸入時間大於臨界時間時,表示使用者目前是以較慢的速度進行輸入,因此處理單元120會將長按延遲時間調整為較長的數值,以避免電子裝置100反應過快而增加使用者輸入錯誤的可能性。In other words, once the processing unit 120 determines that the input time of the m key inputs is less than the critical time, the input action on behalf of the user is quite skilled, so the processing unit 120 will shorten the long press delay time of the electronic device 100 to reduce the input pause pair. The inconvenience caused by the user. On the other hand, when the processing unit 120 determines that the input time of the m key inputs is greater than the critical time, it indicates that the user is currently inputting at a slow speed, so the processing unit 120 adjusts the long press delay time to a longer value to The electronic device 100 is prevented from reacting too fast and the possibility of user input errors is increased.

以下則配合圖示來說明處理單元120計算輸入時間以及調整長按延遲時間的機制。圖2是依照本發明之一實施例所繪示之動態調整長按延遲時間的方法之流程圖。請參閱圖2,在本實施例中電子裝置100已接收多個按鍵輸入,而處理單元120會將對應於各按鍵輸入之接收時間點的時間戳記記錄於儲存單元130。換言之,每當電子裝置100接收到一按鍵輸入,處理單元120便會將對應於該按鍵輸入之接收時間點的時間戳記記錄至儲存單元130。Hereinafter, the mechanism for calculating the input time and adjusting the long press delay time by the processing unit 120 will be described with reference to the drawings. 2 is a flow chart of a method for dynamically adjusting a long press delay time according to an embodiment of the invention. Referring to FIG. 2, in the embodiment, the electronic device 100 has received a plurality of key inputs, and the processing unit 120 records the time stamp corresponding to the receiving time point of each key input in the storage unit 130. In other words, each time the electronic device 100 receives a key input, the processing unit 120 records a time stamp corresponding to the reception time point of the key input to the storage unit 130.

為了計算m個按鍵輸入的輸入時間以反應按鍵輸入速度,首先如步驟210所示,處理單元120從儲存單元130所記錄的所有時間戳記中取得n個合格(qualified)時間戳記(n為大於1之整數)。並如步驟220所示,處理單元120根據這n個合格時間戳記計算對應於m個按鍵輸入的輸入時間。In order to calculate the input time of the m key inputs to reflect the key input speed, first, as shown in step 210, the processing unit 120 obtains n qualified time stamps from all time stamps recorded by the storage unit 130 (n is greater than 1) The integer). And as shown in step 220, the processing unit 120 calculates an input time corresponding to the m key inputs based on the n qualified time stamps.

在一實施例中,處理單元120所取得的合格時間戳記是指時間戳記所對應的按鍵輸入必須屬於一字元鍵輸入(例如字母鍵、數字鍵或符號鍵的輸入)。詳細地說,當按鍵輸入對應於字母鍵、數字鍵或符號鍵的輸入時,其時間戳記為合格的時間戳記;而當按鍵輸入對應於其他非字母鍵、數字鍵或符號鍵的輸入時(例如空白鍵),其時間戳記為非合格的時間戳記。然而,此並非為本發明的限制,在本發明的其他實施例中,合格時間戳記所對應之字元鍵輸入的種類可依設計需求有所不同。舉例來說,當按鍵輸入對應於字母鍵或數字鍵的輸入時,其時間戳記為合格的時間戳記;而當按鍵輸入對應於其他非字母鍵或數字鍵的輸入時(例如符號鍵或空白鍵),其時間戳記為非合格的時間戳記。據此,處理單元120根據n個合格時間戳記計算(m-1)個時間間隔,並計算(m-1)個時間間隔的總和以作為此m個按鍵輸入所對應的輸入時間。其中,(m-1)個時間間隔中的每個時間間隔都是由兩個相鄰的合格時間戳記所構成。In an embodiment, the qualified time stamp obtained by the processing unit 120 means that the key input corresponding to the time stamp must belong to a character key input (for example, an input of a letter key, a numeric key, or a symbol key). In detail, when the key input corresponds to the input of the letter key, the numeric key or the symbol key, the time stamp is regarded as a qualified time stamp; and when the key input corresponds to the input of other non-letter keys, numeric keys or symbol keys ( For example, a blank key) whose timestamp is a non-qualified timestamp. However, this is not a limitation of the present invention. In other embodiments of the present invention, the type of character key input corresponding to the qualified time stamp may vary according to design requirements. For example, when a key input corresponds to an input of a letter key or a numeric key, its time stamp is a qualified time stamp; and when a key input corresponds to an input of another non-alpha or numeric key (for example, a symbol key or a blank key) ), whose timestamp is a non-qualified timestamp. Accordingly, the processing unit 120 calculates (m-1) time intervals from the n qualified time stamps, and calculates the sum of (m-1) time intervals as the input time corresponding to the m key inputs. Wherein, each time interval in (m-1) time intervals is composed of two adjacent qualified time stamps.

為了方便說明,假設m為5,而圖3A所示之時間戳記T1~T5是處理單元120自儲存單元130所取得的5個時間戳記。倘若時間戳記T1~T5都屬於合格時間戳記,那麼處理單元120便會計算時間間隔I12 、I23 、I34 、I45 的總和以作為5個按鍵輸入所對應的輸入時間。For convenience of explanation, it is assumed that m is 5, and the time stamps T1 to T5 shown in FIG. 3A are the five time stamps acquired by the processing unit 120 from the storage unit 130. If the timestamp T1 ~ T5 are all qualified time stamps, the processing unit 120 will calculate the time intervals I 12, I 23, I 34 , I 45 is the sum of the five key inputs as corresponding to the input time.

然而如圖3B所示,倘若處理單元120已取得的4個時間戳記T1~T4均屬於合格時間戳記,但處理單元120第5個取得的時間戳記T5並非合格時間戳記。由於計算5個按鍵輸入所對應的輸入時間需要4個由兩兩相鄰之合格時間戳記所構成的時間間隔,因此處理單元120必須繼續從儲存單元130取得其他的時間戳記。假設處理單元120接下來取得的時間戳記T6、T7均屬於合格時間戳記,處理單元120便會計算時間間隔I12 、I23 、I34 、I67 的總和以作為5個按鍵輸入的輸入時間。However, as shown in FIG. 3B, if the four time stamps T1 to T4 that have been acquired by the processing unit 120 belong to the qualified time stamp, the fifth time stamp T5 obtained by the processing unit 120 is not a qualified time stamp. Since the input time corresponding to the calculation of the five key inputs requires four time intervals consisting of two adjacent qualified time stamps, the processing unit 120 must continue to obtain other time stamps from the storage unit 130. Assuming that the time stamps T6, T7 subsequently obtained by the processing unit 120 belong to the qualified time stamp, the processing unit 120 calculates the sum of the time intervals I 12 , I 23 , I 34 , I 67 as the input time of the five key inputs.

在上述實施例中,在計算m個按鍵輸入的輸入時間時,處理單元120必須從儲存單元130取得足夠的n個合格時間戳記,以產生(m-1)個由兩兩相鄰之合格時間戳記所構成的時間間隔。n的多寡會與m的大小以及儲存單元130中合格時間戳記的相連與否有關。另外必須特別說明的是,在圖3A、3B中T1至T7僅是為了說明而標示的符號,用以表示這些時間戳記的連續性,但並不代表這些時間戳記在儲存單元130中的新舊程度。換句話說,時間戳記T7未必是儲存單元130中的最新時間戳記。In the above embodiment, when calculating the input time of the m key inputs, the processing unit 120 must obtain enough n qualified time stamps from the storage unit 130 to generate (m-1) qualified times by two adjacent pairs. The time interval formed by the stamp. The amount of n will be related to the size of m and the connection of qualified time stamps in storage unit 130. In addition, it should be particularly noted that in FIGS. 3A and 3B, T1 to T7 are only symbols for the sake of explanation, which are used to indicate the continuity of these time stamps, but do not represent the old and new of these time stamps in the storage unit 130. degree. In other words, the timestamp T7 is not necessarily the latest timestamp in the storage unit 130.

在另一實施例中,處理單元120會自儲存單元130取得兩個合格時間戳記,並計算這兩個合格時間戳記的差值來作為m個按鍵輸入的輸入時間,而上述兩個合格時間戳記所對應的按鍵輸入分別是第i個按鍵輸入與第(i+m-1)個按鍵輸入。舉例來說,當i=1且m=5時,上述兩個合格時間戳記分別是對應於第1個按鍵輸入的時間戳記T1與對應於第5個按鍵輸入的時間戳記T5,而處理單元120便計算時間戳記T5與T1的差值以作為5個按鍵輸入的輸入時間。必須說明的是,當i=1時,儲存單元130至少必須記錄m筆時間戳記,處理單元120才能取得兩個合格時間戳記以計算m個按鍵輸入的輸入時間。In another embodiment, the processing unit 120 obtains two qualified time stamps from the storage unit 130, and calculates the difference between the two qualified time stamps as the input time of the m key inputs, and the two qualified time stamps The corresponding key inputs are the ith key input and the (i+m-1) key input. For example, when i=1 and m=5, the two qualified time stamps are the time stamp T1 corresponding to the first key input and the time stamp T5 corresponding to the fifth key input, and the processing unit 120 The difference between the time stamps T5 and T1 is calculated as the input time for the five key inputs. It should be noted that when i=1, the storage unit 130 must record at least the m time stamp, and the processing unit 120 can obtain two qualified time stamps to calculate the input time of the m key inputs.

在上述兩個實施例當中,處理單元120所取得的n個合格時間戳記包含儲存單元130所記錄的最新時間戳記。然而在本發明的其他實施例中,處理單元120所取得的n個合格時間戳記也可以不包括儲存單元130所記錄的最新時間戳記。另外,處理單元120在取得n個合格時間戳記後,亦能透過其他方式來計算對應於m個按鍵輸入的輸入時間,本發明並不對m個按鍵輸入之輸入時間的計算方式加以限制。In the above two embodiments, the n qualified time stamps obtained by the processing unit 120 include the latest time stamp recorded by the storage unit 130. However, in other embodiments of the present invention, the n qualified time stamps obtained by the processing unit 120 may not include the latest time stamp recorded by the storage unit 130. In addition, after obtaining n qualified time stamps, the processing unit 120 can also calculate the input time corresponding to the m key inputs through other methods, and the present invention does not limit the calculation method of the input time of the m key inputs.

在計算輸入時間之後,接著如步驟230所示,處理單元120判斷輸入時間是否小於臨界時間(例如2500毫秒)。若是,在步驟240中處理單元120將長按延遲時間設定為第一預設值(例如400毫秒)。若否,如步驟250所示處理單元120將長按延遲時間設定為第二預設值(例如750毫秒)。After calculating the input time, then as shown in step 230, processing unit 120 determines if the input time is less than a critical time (eg, 2500 milliseconds). If so, in step 240 the processing unit 120 sets the long press delay time to a first preset value (eg, 400 milliseconds). If not, the processing unit 120 sets the long press delay time to a second preset value (for example, 750 milliseconds) as shown in step 250.

圖4是依照本發明之另一實施例所繪示之動態調整長按延遲時間的方法之流程圖。請參閱圖4,如步驟410所示,每當電子裝置100接收到一按鍵輸入,處理單元120便會判斷此按鍵輸入是否對應於功能鍵輸入(例如倒退鍵(backspace key)、方向鍵或刪除鍵(delete key)的輸入)。詳細地說,當按鍵輸入對應於倒退鍵、方向鍵或刪除鍵的輸入時,表示使用者可能已產生輸入錯誤的情形,因此如步驟415所示,無論目前長按延遲時間的長短,處理單元120直接將長按延遲時間設定為一預設值。4 is a flow chart of a method for dynamically adjusting a long press delay time according to another embodiment of the present invention. Referring to FIG. 4, as shown in step 410, each time the electronic device 100 receives a key input, the processing unit 120 determines whether the key input corresponds to a function key input (eg, a backspace key, a direction key, or a delete). Input of the key (delete key). In detail, when the key input corresponds to the input of the reverse key, the direction key or the delete key, it indicates that the user may have generated an input error, so as shown in step 415, regardless of the length of the current long press delay, the processing unit 120 directly sets the long press delay time to a preset value.

然而若按鍵輸入並不對應於上述功能鍵輸入,處理單元120則自儲存單元130取得n個合格時間戳記,從而計算m個按鍵輸入的輸入時間以決定要將長按延遲時間設定為較小之第一預設值或較大之第二預設值。由於圖4之步驟420至步驟460與圖2之步驟210至250相同或相似,在此不再贅述。However, if the key input does not correspond to the function key input, the processing unit 120 obtains n qualified time stamps from the storage unit 130, thereby calculating the input time of the m key inputs to determine that the long press delay time is to be set to be smaller. The first preset value or the second preset value that is larger. Since steps 420 to 460 of FIG. 4 are the same as or similar to steps 210 to 250 of FIG. 2, details are not described herein again.

值得注意的是,在步驟410中,電子裝置100判斷按鍵輸入是否對應於功能鍵輸入時,該功能鍵輸入種類可依設計需求有所不同。舉例來說,在一實施例中,僅當按鍵輸入對應於倒退鍵輸入時,處理單元120才執行步驟415。然而若按鍵輸入不對應於倒退鍵輸入時(例如方向鍵或刪除鍵的輸入),處理單元120則執行步驟420。It should be noted that, in step 410, when the electronic device 100 determines whether the key input corresponds to the function key input, the function key input type may be different according to design requirements. For example, in an embodiment, processing unit 120 performs step 415 only when the key input corresponds to the reverse key input. However, if the key input does not correspond to the reverse key input (for example, the input of the direction key or the delete key), the processing unit 120 performs step 420.

圖5是依照本發明之另一實施例所繪示之動態調整長按延遲時間的方法之流程圖。圖5與圖4的步驟類似,兩者不同之處在於圖5以步驟510取代圖4中的步驟410。在步驟510中,每當電子裝置100接收到一按鍵輸入,處理單元120便會判斷此按鍵輸入所對應的編輯欄位,與前一次接收之按鍵輸入所對應的編輯欄位是否相同。若不相同,在步驟515中處理單元120將長按延遲時間設定為一預設值。FIG. 5 is a flow chart of a method for dynamically adjusting a long press delay time according to another embodiment of the present invention. 5 is similar to the steps of FIG. 4, except that FIG. 5 replaces step 410 in FIG. 4 with step 510. In step 510, each time the electronic device 100 receives a key input, the processing unit 120 determines whether the edit field corresponding to the key input is the same as the edit field corresponding to the previously received key input. If not, the processing unit 120 sets the long press delay time to a preset value in step 515.

此外,處理單元120會將儲存單元130所記錄的所有時間戳記清空。亦即,儲存單元130只會累積對應於同一編輯欄位的時間戳記,而一旦使用者更換編輯欄位,儲存單元130中的資料就會被清除。然而若處理單元120判斷編輯欄位並未改變,接下來的處理步驟520至步驟560則與圖2之步驟210至250相同或相似,故在此不再贅述。In addition, the processing unit 120 will clear all time stamps recorded by the storage unit 130. That is, the storage unit 130 only accumulates time stamps corresponding to the same edit field, and once the user replaces the edit field, the data in the storage unit 130 is cleared. However, if the processing unit 120 determines that the edit field has not changed, the subsequent processing steps 520 to 560 are the same as or similar to the steps 210 to 250 of FIG. 2, and thus are not described herein again.

值得注意的是,在步驟415與步驟515中處理單元120直接將長按延遲時間設定為一預設值,該預設值可為儲存於電子裝置100內的任意預設值,或由使用者自行設定。在一實施例中,儲存於電子裝置100內之該預設值可相同於較大之第二預設值。It should be noted that, in step 415 and step 515, the processing unit 120 directly sets the long press delay time to a preset value, which may be any preset value stored in the electronic device 100, or by the user. Set it yourself. In an embodiment, the preset value stored in the electronic device 100 may be the same as the second second preset value.

在圖2、4、5所述之實施例中,倘若處理單元120無法從儲存單元130所記錄的時間戳記中取得n個合格時間戳記,亦即,儲存單元130所記錄所有時間戳記不足以構成n個合格時間戳記,那麼處理單元120會將電子裝置100的長按延遲時間設定為一預設值。值得注意的是,該預設值可為儲存於電子裝置100內的任意預設值,或由使用者自行設定。在一實施例中,儲存於電子裝置100內之該預設值可相同於較大之第二預設值。In the embodiment illustrated in FIGS. 2, 4, and 5, if the processing unit 120 cannot obtain n qualified time stamps from the time stamp recorded by the storage unit 130, that is, all the time stamps recorded by the storage unit 130 are insufficient to constitute The n-time stamps are set, and the processing unit 120 sets the long-press delay time of the electronic device 100 to a preset value. It should be noted that the preset value may be any preset value stored in the electronic device 100 or set by the user. In an embodiment, the preset value stored in the electronic device 100 may be the same as the second second preset value.

在本發明的另一實施例中,處理單元120也可將反應按鍵輸入速度的m個按鍵輸入之輸入時間,與多個臨界時間進行比較,從而多階段式地調整電子裝置100的長按延遲時間。舉例來說,當m個按鍵輸入的輸入時間小於第一臨界時間(例如1500毫秒)時,處理單元120將長按延遲時間設定為400毫秒。倘若m個按鍵輸入的輸入時間大於第二臨界時間(例如5000毫秒),處理單元120將長按延遲時間設定為750毫秒。而在m個按鍵輸入的輸入時間介於第一臨界時間與第二臨界時間之間時,處理單元120將長按延遲時間設定為600毫秒。In another embodiment of the present invention, the processing unit 120 may also compare the input time of the m key inputs of the reaction key input speed with a plurality of critical times, thereby adjusting the long delay of the electronic device 100 in multiple stages. time. For example, when the input time of the m key inputs is less than the first critical time (eg, 1500 milliseconds), the processing unit 120 sets the long press delay time to 400 milliseconds. If the input time of the m key inputs is greater than the second critical time (eg, 5000 milliseconds), the processing unit 120 sets the long press delay time to 750 milliseconds. When the input time of the m key inputs is between the first critical time and the second critical time, the processing unit 120 sets the long press delay time to 600 milliseconds.

在本發明的另一實施例中,處理單元120也可根據編輯欄位的種類設定不同的臨界時間。而在判斷按鍵輸入速度時,則以使用者當時進行輸入之編輯欄位所對應的臨界時間來作為判斷依據。In another embodiment of the present invention, the processing unit 120 may also set different critical times according to the type of the editing field. When judging the key input speed, the critical time corresponding to the edit field input by the user at that time is used as a judgment basis.

本發明另提供一種電腦程式產品,此電腦程式產品基本上是由數個程式指令所組成(例如設定程式指令或部署程式指令等等)。這些程式指令在載入電子裝置並執行之後,便可完成上述動態調整長按延遲時間之方法的各步驟,同時使得電子裝置實現上述實施例所說明的功能。其中,電腦程式產品可以儲存在任何資料儲存裝置(包括唯讀記憶體、隨機存取記憶體、磁帶、軟碟、硬碟、光碟片以及傳輸媒體等等),或是經由網路直接傳輸提供,在此並不限制其範圍。The invention further provides a computer program product, which is basically composed of a plurality of program instructions (for example, setting a program instruction or deploying a program instruction, etc.). After the program instructions are loaded into the electronic device and executed, the steps of the method of dynamically adjusting the long press delay time can be completed, and the electronic device can implement the functions described in the above embodiments. The computer program product can be stored in any data storage device (including read-only memory, random access memory, tape, floppy disk, hard disk, optical disk, transmission media, etc.) or directly transmitted via the network. This does not limit its scope here.

綜上所述,本發明所示之動態調整長按延遲時間的方法、電子裝置與電腦程式產品係根據按鍵輸入速度的快慢來對應改變電子裝置的長按延遲時間,進而使得電子裝置啟動長按功能的速度能依據使用者的輸入速度而有所調整。據此,增加使用者在電子裝置上進行輸入動作的流暢感,以提升使用電子裝置的便利性。In summary, the method for dynamically adjusting the delay time of the invention, the electronic device and the computer program product according to the present invention are corresponding to changing the delay time of the electronic device according to the speed of the input speed of the button, thereby enabling the electronic device to start and press the long press. The speed of the function can be adjusted according to the user's input speed. Accordingly, the fluent feeling of the input operation of the user on the electronic device is increased to improve the convenience of using the electronic device.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,故本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims.

100...電子裝置100. . . Electronic device

110a、110b、110c...按鍵110a, 110b, 110c. . . button

120...處理單元120. . . Processing unit

130...儲存單元130. . . Storage unit

210~250...本發明之一實施例所述之動態調整長按延遲時間的方法之各步驟210~250. . . Each step of the method for dynamically adjusting the long press delay time according to an embodiment of the present invention

T1、T2、T3、T4、T5、T6、T7...時間戳記T1, T2, T3, T4, T5, T6, T7. . . Timestamp

I12 、I23 、I34 、I45 、I67 ...時間間隔I 12 , I 23 , I 34 , I 45 , I 67 . . . time interval

410~460...本發明之另一實施例所述之動態調整長按延遲時間的方法之各步驟410~460. . . Each step of the method for dynamically adjusting the long press delay time according to another embodiment of the present invention

510~560...本發明之另一實施例所述之動態調整長按延遲時間的方法之各步驟510 ~ 560. . . Each step of the method for dynamically adjusting the long press delay time according to another embodiment of the present invention

圖1是依照本發明之一實施例所繪示之電子裝置的方塊圖。1 is a block diagram of an electronic device in accordance with an embodiment of the present invention.

圖2是依照本發明之一實施例所繪示之動態調整長按延遲時間的方法之流程圖。2 is a flow chart of a method for dynamically adjusting a long press delay time according to an embodiment of the invention.

圖3A、3B是依照本發明之一實施例所繪示之時間戳記與時間間隔的示意圖。3A and 3B are schematic diagrams showing time stamps and time intervals according to an embodiment of the invention.

圖4是依照本發明之另一實施例所繪示之動態調整長按延遲時間的方法之流程圖。4 is a flow chart of a method for dynamically adjusting a long press delay time according to another embodiment of the present invention.

圖5是依照本發明之另一實施例所繪示之動態調整長按延遲時間的方法之流程圖。FIG. 5 is a flow chart of a method for dynamically adjusting a long press delay time according to another embodiment of the present invention.

210~250...本發明之一實施例所述之動態調整長按延遲時間的方法之各步驟210~250. . . Each step of the method for dynamically adjusting the long press delay time according to an embodiment of the present invention

Claims (22)

一種動態調整長按延遲時間的方法,用於具有至少一按鍵的一電子裝置,該方法包括:接收複數個按鍵輸入;依據一按鍵輸入速度設定該電子裝置的一長按延遲時間;判斷所接收之一按鍵輸入是否對應於一功能鍵輸入;若所接收之該按鍵輸入對應於該功能鍵輸入,設定該長按延遲時間為一第一預設值;以及當對應於該至少一按鍵其中之一按鍵的一次按壓的一持續按壓時間大於該長按延遲時間時,該電子裝置執行對應於該按鍵的一長按功能。 A method for dynamically adjusting a long press delay time for an electronic device having at least one button, the method comprising: receiving a plurality of key inputs; setting a long press delay time of the electronic device according to a key input speed; determining the received Whether a key input corresponds to a function key input; if the received key input corresponds to the function key input, setting the long press delay time to a first preset value; and when corresponding to the at least one button When a continuous pressing time of one press of a button is greater than the long pressing delay time, the electronic device performs a long press function corresponding to the button. 如申請專利範圍第1項所述之方法,其中依據該按鍵輸入速度設定該長按延遲時間的步驟包括:計算對應於m個按鍵輸入之一輸入時間,其中m為一正整數;當該輸入時間小於一臨界時間(threshold time)時,設定該長按延遲時間為一第二預設值;以及當該輸入時間大於該臨界時間時,設定該長按延遲時間為一第三預設值,其中該第二預設值小於該第三預設值。 The method of claim 1, wherein the step of setting the long press delay time according to the key input speed comprises: calculating an input time corresponding to one of the m key inputs, wherein m is a positive integer; when the input When the time is less than a threshold time, the long delay time is set to a second preset value; and when the input time is greater than the critical time, the long press delay time is set to a third preset value, The second preset value is smaller than the third preset value. 如申請專利範圍第2項所述之方法,其中計算對應於m個按鍵輸入之該輸入時間的步驟包括:在接收該些按鍵輸入時,記錄對應於該些按鍵輸入之接收時間點的複數個時間戳記; 從該些時間戳記中取得n個合格(qualified)時間戳記,其中n為大於一之一整數;以及根據該n個合格時間戳記計算對應於m個按鍵輸入之該輸入時間。 The method of claim 2, wherein the calculating the input time corresponding to the m key inputs comprises: recording the plurality of receiving time points corresponding to the key inputs when receiving the key inputs Time stamp Obtaining n qualified timestamps from the timestamps, where n is greater than one of the integers; and calculating the input time corresponding to the m key inputs based on the n qualified timestamps. 如申請專利範圍第3項所述之方法,其中該n個合格時間戳記所對應的按鍵輸入均屬於一字元鍵輸入,以及根據該n個合格時間戳記計算對應於m個按鍵輸入之該輸入時間的步驟包括:根據該n個合格時間戳記計算(m-1)個時間間隔,其中各該(m-1)個時間間隔是由兩個相鄰的合格時間戳記所構成;以及計算該(m-1)個時間間隔之總和,以作為對應於m個按鍵輸入之該輸入時間。 The method of claim 3, wherein the key input corresponding to the n qualified time stamps belongs to a character key input, and the input corresponding to the m key inputs is calculated according to the n qualified time stamps The step of time includes: calculating (m-1) time intervals according to the n qualified time stamps, wherein each of the (m-1) time intervals is composed of two adjacent qualified time stamps; and calculating the ( M-1) The sum of time intervals as the input time corresponding to m key inputs. 如申請專利範圍第4項所述之方法,其中該字元鍵輸入包含字母鍵輸入、數字鍵輸入或符號鍵輸入。 The method of claim 4, wherein the character key input comprises a letter key input, a numeric key input, or a symbol key input. 如申請專利範圍第3項所述之方法,其中n等於二,且該兩個合格時間戳記所對應的按鍵輸入分別為第i個按鍵輸入與第(i+m-1)個按鍵輸入,以及根據該n個合格時間戳記計算對應於m個按鍵輸入之該輸入時間的步驟包括:計算該兩個合格時間戳記之差值,以作為對應於m個按鍵輸入之該輸入時間。 The method of claim 3, wherein n is equal to two, and the key inputs corresponding to the two qualified time stamps are the i-th key input and the (i+m-1) key input, respectively, and The step of calculating the input time corresponding to the m key inputs based on the n qualified time stamps includes calculating a difference between the two qualified time stamps as the input time corresponding to the m key inputs. 如申請專利範圍第3項所述之方法,其中該n個合格時間戳記包含所記錄的該些時間戳記中之一最新時間戳 記。 The method of claim 3, wherein the n qualified time stamps include one of the recorded time stamps Remember. 如申請專利範圍第3項所述之方法,更包括:判斷是否從該些時間戳記中取得該n個合格時間戳記;以及若否,設定該長按延遲時間為一第四預設值。 The method of claim 3, further comprising: determining whether the n qualified time stamps are obtained from the time stamps; and if not, setting the long press delay time to a fourth preset value. 如申請專利範圍第1項所述之方法,其中該功能鍵輸入包含倒退鍵(backspace key)輸入、方向鍵輸入或刪除鍵(delete key)輸入。 The method of claim 1, wherein the function key input comprises a backspace key input, a direction key input or a delete key input. 如申請專利範圍第1項所述之方法,更包括:判斷所接收之一按鍵輸入所對應之編輯欄位,與前一次接收之按鍵輸入所對應之編輯欄位是否相同;以及若否,設定該長按延遲時間為一第二預設值。 The method of claim 1, further comprising: determining whether the edit field corresponding to one of the received key inputs is the same as the edit field corresponding to the previous received key input; and if not, setting The long press delay time is a second preset value. 一種電子裝置,包括:至少一按鍵;以及一處理單元,耦接該至少一按鍵,其中當對應於該至少一按鍵其中之一按鍵的一次按壓的一持續按壓時間大於一長按延遲時間時,該處理單元執行對應於該按鍵的一長按功能,而在接收複數個按鍵輸入時,該處理單元依據一按鍵輸入速度設定該電子裝置的該長按延遲時間,其中該處理單元判斷所接收之一按鍵輸入是否對應於一功能鍵輸入,若若所接收之該按鍵輸入對應於該功能鍵輸入,則該處理單元設定該長按延遲時間為一第一預設值。 An electronic device comprising: at least one button; and a processing unit coupled to the at least one button, wherein when a continuous pressing time corresponding to one pressing of one of the at least one button is greater than a long pressing delay time, The processing unit performs a long press function corresponding to the button, and when receiving a plurality of button inputs, the processing unit sets the long press delay time of the electronic device according to a button input speed, wherein the processing unit determines the received Whether a key input corresponds to a function key input, and if the received key input corresponds to the function key input, the processing unit sets the long press delay time to a first preset value. 如申請專利範圍第11項所述之電子裝置,其中該處理單元計算對應於m個按鍵輸入之一輸入時間,而當該輸入時間小於一臨界時間時,該處理單元設定該長按延遲時間為一第二預設值,並當該輸入時間大於該臨界時間時,該處理單元設定該長按延遲時間為一第三預設值,其中m為一正整數,且該第二預設值小於該第三預設值。 The electronic device of claim 11, wherein the processing unit calculates an input time corresponding to one of the m key inputs, and when the input time is less than a critical time, the processing unit sets the long press delay time to a second preset value, and when the input time is greater than the critical time, the processing unit sets the long press delay time to a third preset value, where m is a positive integer, and the second preset value is less than The third preset value. 如申請專利範圍第12項所述之電子裝置,更包括:一儲存單元,耦接該處理單元,其中該處理單元在接收該些按鍵輸入時,記錄對應於該些按鍵輸入之接收時間點的複數個時間戳記於該儲存單元,且該處理單元從該些時間戳記中取得n個合格時間戳記,並根據該n個合格時間戳記計算對應於該m個按鍵輸入之該輸入時間,其中n為大於一之一整數。 The electronic device of claim 12, further comprising: a storage unit coupled to the processing unit, wherein the processing unit records the receiving time points corresponding to the key inputs when receiving the key inputs a plurality of time stamps are recorded in the storage unit, and the processing unit obtains n qualified time stamps from the time stamps, and calculates the input time corresponding to the m key inputs according to the n qualified time stamps, where n is Greater than one of the integers. 如申請專利範圍第13項所述之電子裝置,其中該n個合格時間戳記所對應的按鍵輸入均屬於一字元鍵輸入,而該處理單元根據該n個合格時間戳記計算(m-1)個時間間隔,並計算該(m-1)個時間間隔之總和,以作為對應於該m個按鍵輸入之該輸入時間,其中各該(m-1)個時間間隔是由兩個相鄰的合格時間戳記所構成。 The electronic device of claim 13, wherein the key input corresponding to the n qualified time stamps belongs to a character key input, and the processing unit calculates (m-1) according to the n qualified time stamps. Intervals, and calculate the sum of the (m-1) time intervals as the input time corresponding to the m key inputs, wherein each (m-1) time interval is by two adjacent A qualified time stamp is formed. 如申請專利範圍第14項所述之電子裝置,其中該字元鍵輸入包含字母鍵輸入、數字鍵輸入或符號鍵輸入。 The electronic device of claim 14, wherein the character key input comprises a letter key input, a numeric key input or a symbol key input. 如申請專利範圍第13項所述之電子裝置,其中n等於二,且該處理單元取得的該兩個合格時間戳記所對應的按鍵輸入分別為第i個按鍵輸入與第(i+m-1)個按鍵輸 入,該處理單元計算該兩個合格時間戳記之差值,以作為對應於該m個按鍵輸入之該輸入時間。 The electronic device of claim 13, wherein n is equal to two, and the key input corresponding to the two qualified time stamps obtained by the processing unit is the i-th key input and the (i+m-1) ) a button to lose The processing unit calculates a difference between the two qualified time stamps as the input time corresponding to the m key inputs. 如申請專利範圍第13項所述之電子裝置,其中該n個合格時間戳記包含該儲存單元所記錄的該些時間戳記中之一最新時間戳記。 The electronic device of claim 13, wherein the n qualified time stamps comprise one of the latest time stamps of the time stamps recorded by the storage unit. 如申請專利範圍第13項所述之電子裝置,其中當該儲存單元所記錄的該些時間戳記不構成該n個合格時間戳記,該處理單元設定該長按延遲時間為一第四預設值。 The electronic device of claim 13, wherein the processing unit sets the long press delay time to a fourth preset value when the time stamps recorded by the storage unit do not constitute the n qualified time stamps. . 如申請專利範圍第11項所述之電子裝置,其中該功能鍵輸入包含倒退鍵輸入、方向鍵輸入或刪除鍵輸入。 The electronic device of claim 11, wherein the function key input comprises a reverse key input, a direction key input or a delete key input. 如申請專利範圍第11項所述之電子裝置,其中該處理單元判斷所接收之一按鍵輸入所對應之編輯欄位,與前一次接收之按鍵輸入所對應之編輯欄位是否相同,若否,則該處理單元設定該長按延遲時間為一第二預設值。 The electronic device of claim 11, wherein the processing unit determines whether the edit field corresponding to the received one of the key inputs is the same as the edit field corresponding to the previous received key input, and if not, Then, the processing unit sets the long press delay time to a second preset value. 一種電腦程式產品,包括用以載入一電子裝置的至少一程式指令,該些程式指令在載入該電子裝置後執行如申請專利範圍第1項至第10項中任一項所述之動態調整長按延遲時間的方法。 A computer program product comprising at least one program instruction for loading an electronic device, the program instructions performing the dynamics of any one of claims 1 to 10 after loading the electronic device Adjust the method of long press delay. 一種電子裝置,該電子裝置包括至少一按鍵,該電子裝置包括:一按鍵輸入接收手段,用以接收複數個按鍵輸入;一長按延遲時間調整手段,用以依據一按鍵輸入速度設定該電子裝置的該長按延遲時間,判斷所接收之一按鍵輸入是否對應於一功能鍵輸入,以及若所接收之該按鍵輸 入對應於該功能鍵輸入,設定該長按延遲時間為一預設值,其中當對應於該至少一按鍵其中之一按鍵的一次按壓的一持續按壓時間大於該長按延遲時間時,該電子裝置執行對應於該按鍵的一長按功能。An electronic device comprising at least one button, the electronic device comprising: a button input receiving means for receiving a plurality of button inputs; and a long press delay time adjusting means for setting the electronic device according to a button input speed The long press delay time determines whether one of the received key inputs corresponds to a function key input, and if the key input is received Corresponding to the function key input, setting the long press delay time to a preset value, wherein when a continuous pressing time corresponding to one press of one of the at least one button is greater than the long press delay time, the electronic The device performs a long press function corresponding to the button.
TW098143238A 2009-06-24 2009-12-16 Method of dynamically adjusting long-press delay time, electronic device, and computer program product thereof TWI486816B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN2010100045911A CN101930295B (en) 2009-06-24 2010-01-19 Method of dynamically adjusting long-press delay time and electronic device
US12/702,307 US8441377B2 (en) 2009-06-24 2010-02-09 Method of dynamically adjusting long-press delay time, electronic device, and computer-readable medium
EP10153981A EP2267581A1 (en) 2009-06-24 2010-02-18 Method of dynamically adjusting long-press delay time, electronic device, and computer-readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US22018209P 2009-06-24 2009-06-24

Publications (2)

Publication Number Publication Date
TW201101119A TW201101119A (en) 2011-01-01
TWI486816B true TWI486816B (en) 2015-06-01

Family

ID=44836904

Family Applications (1)

Application Number Title Priority Date Filing Date
TW098143238A TWI486816B (en) 2009-06-24 2009-12-16 Method of dynamically adjusting long-press delay time, electronic device, and computer program product thereof

Country Status (1)

Country Link
TW (1) TWI486816B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6744422B1 (en) * 2001-07-13 2004-06-01 Openwave Systems Inc. Variable time-out for multi-tap key entry

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6744422B1 (en) * 2001-07-13 2004-06-01 Openwave Systems Inc. Variable time-out for multi-tap key entry

Also Published As

Publication number Publication date
TW201101119A (en) 2011-01-01

Similar Documents

Publication Publication Date Title
US8441377B2 (en) Method of dynamically adjusting long-press delay time, electronic device, and computer-readable medium
US7574672B2 (en) Text entry interface for a portable communication device
US8918736B2 (en) Replay recommendations in a text entry interface
US7860536B2 (en) Telephone interface for a portable communication device
US8060825B2 (en) Creating digital artwork based on content file metadata
US7694231B2 (en) Keyboards for portable electronic devices
US9354797B2 (en) Progress adjustment method and electronic device
US20110175829A1 (en) Information processing device, operation input method and operation input program
CN101889261A (en) Method for providing ui capable of detecting a plurality of forms of touch on menus or background and multimedia device using the same
US9798512B1 (en) Context-based volume adjustment
WO2017161826A1 (en) Functional control method and terminal
JP2011053770A (en) Information processing apparatus and input processing method
CN104575554A (en) Control method and terminal for broadcasting progress of multimedia data
CN110377220A (en) A kind of instruction response method, device, storage medium and electronic equipment
US20100123657A1 (en) Information processing apparatus, processing method thereof, and computer-readable storage medium
WO2018204100A1 (en) Control video playback speed based on user interaction
CN104898880A (en) Control method and electronic equipment
US20130050094A1 (en) Method and apparatus for preventing malfunction of touchpad in electronic device
WO2018218392A1 (en) Touch operation processing method and touch keyboard
CN106507187A (en) A kind of video broadcasting method and terminal
TWI486816B (en) Method of dynamically adjusting long-press delay time, electronic device, and computer program product thereof
CN110727411A (en) Audio signal processing method and device, storage medium and terminal
CN106155622A (en) A kind of audio moade setting method and device
JP2016075808A (en) Parameter value setting device
US10250945B2 (en) Replaying system and replaying method