The present invention relates to a starting method and more particularly, to a starting method for inputting Morse code and a portable electronic device thereof.
In the prior art, a button on a portable electronic device can be pressed to input Morse code. However, during the inputting process, the portable electronic device is frequently required to be in an operating mode, i.e., a state in which a screen is lit. Thus, when a user in an emergency wishes to secretively input Morse code through a portable electronic device, the above prior art cannot satisfy such need.
In view of the above, it is an object of the present invention to provide a starting method for inputting Morse code when a portable electronic device is in a sleep mode or shutdown mode and a portable electronic device thereof.
To achieve the above object, a starting method for inputting Morse code is provided according to an embodiment of the present invention. The starting method is performed in a portable electronic device that includes a first physical button, a second physical button, a sensing circuit and a processing circuit. The starting method includes the following steps: when the portable electronic device is switched to a sleep mode or a shutdown mode, enabling the sensing circuit to sense whether the first physical button and the second physical button are simultaneously pressed by a user; and when the first physical button and the second physical button are simultaneously pressed by the user, enabling the processing circuit to generate a longer mark of Morse code or a shorter mark of Morse code according to the duration for which the user presses the first physical button or the second physical button. A portable electronic device is further provided according to another embodiment of the present invention. The portable electronic device includes a first physical button, a second physical button, a sensing circuit, a processing circuit and a storage device. The storage device stores an application for instructing the portable electronic device to perform the starting method of the foregoing embodiment.
To better understand the features and technical contents of the present invention, detailed description associated with the present invention are given with the accompanying drawings below. It should be noted that, the detailed description and drawings are only for illustrating the present invention and are not to be construed as limitations to the claim scope of the present invention.
The present invention is described in detail in the following embodiments with the accompanying drawings below. However, the concepts of the present invention can be realized in numerous different forms and are not limited to the explanations of the illustrative embodiments in the disclosure. Furthermore, the same reference numerals in the drawings can represent similar elements.
Refer to
It is known from the prior art that, the starting method in
More specifically, as shown in
It should be noted that, even if the processing circuit 140 is enabled to generate a longer mark of Morse code or a shorter mark of Morse code, the embodiment can still enable the portable electronic device 10 to be in a sleep mode or a shutdown mode without requiring the screen to be lit. Thus, on the basis of the teaching of the above disclosure, a person skilled in the art can understand that, the embodiment focuses on a feature that, when the portable electronic device 10 is in a sleep mode or a shutdown mode, the portable electronic device 10 can be enabled to enter a process for inputting Morse code by having a user press two physical buttons in combination on the portable electronic device 10, i.e., simultaneously pressing the first physical button 10 and the second physical button 120. Therefore, compared to the prior art, the embodiment better provides ideal concealment and convenience. That is to say, the embodiment satisfies the requirement of secretively inputting Morse code through the portable electronic device 10 when a user is in a restricted environment such as an emergency.
Furthermore, as shown in
Further, it is assumed that in step S130 of this embodiment that, if the duration for which the user presses the first physical button 110 or the second physical button 120 is between 0.08 s and 0.12 s, a shorter mark of Morse code is generated; if the duration for which the user presses the first physical button 110 or the second physical button 120 is between 0.28 s and 0.32 s, a longer mark of Morse code is generated; however, the present invention is not limited to the above examples. In other embodiments, the process for generating the foregoing longer mark of Morse code or shorter mark of Morse code may also be determined by the processing circuit 140 directly according to whether the user presses the first physical button 110 or the second physical button 120. For example, if the user presses the first physical button 110, a shorter mark of Morse code is generated; if the user presses the second physical button 120, a longer mark of Morse code is generated. In sum, the present invention does not limit the specific implementation of the process for generating a longer mark of Morse code or shorter mark of Morse code.
It should be understood that, the Morse code that a user wishes to input is usually more than one longer mark of Morse code or one shorter mark of Morse code. Thus, in step S150 after step S130, the processing circuit 140 further times an idle period continuously after the user has finished pressing the first physical button 110 or the second physical button 120, and determines whether the idle period is greater than or equal to a predetermined threshold, e.g., 0.5 s. If not, step S160 is performed; if so, step S170 is performed. In step S160, the processing circuit 140 again determines whether the first physical button 110 or the second physical button 120 is again pressed by the user. If not, step S150 is iterated; if so, step S130 is iterated. That is to say, when the idle period is not greater than or equal to the predetermined threshold and the first physical button 110 or the second physical button 120 is again pressed by the user, the embodiment enables the processing circuit 140 to generate a (new) longer mark of Morse code or shorter mark of Morse code according to the duration for which the user presses the first physical button 110 or the second physical button 120. Correspondingly, when the idle period is greater than or equal to the predetermined threshold, the processing circuit 140 determines that the user has finished inputting of Morse code. Thus, in step S170, the embodiment disables the processing circuit 140, and step S120 is iterated.
For example, in this embodiment, it is assumed that when the Morse code that the user wishes to input is “.-”, the processing circuit 140 first generates the shorter mark of Morse code “.” because the duration for which the user presses the first physical button 110 or the second physical button 120 is between 0.08 s and 0.12 s. After a period of pause, i.e., a first idle period T(1) after the user has finished pressing the first physical button 110 or the second physical button 120 for the first time and the first idle period T(1) is not more than 0.5 s, assume that the user again presses the first physical button 110 or the second physical button 120 for the second time. Since the duration for which the user presses the first physical button 110 or the second physical button 120 for the second time is between 0.28 s and 0.32 s, the processing circuit 140 again generates a longer mark of Morse code “-”.
Finally, after another period of pause, i.e., a second idle period T(2) after the user has finished pressing the first physical button 110 or the second physical button 120 for the second time, the second idle period T(2) is inevitably more than 0.5 s because the user has finished inputting the set of Morse code “. -”. Thus, the embodiment ends the inputting process of the set of Morse code “. -”, i.e., disabling the processing circuit 140, and the process returns to the step in which the sensing circuit 130 senses whether the first physical button 110 and the second physical button 120 are simultaneously pressed by a user and awaits for a next inputting process of Morse code to begin. It should be understood that, step S140, step S150 and step S160 in
In conclusion, in the starting method for inputting Morse code and the portable electronic device thereof provided by the embodiments of the present invention, when the portable electronic device is in a sleep mode or a shutdown mode, the portable electronic device can be enabled to enter a process for inputting Morse code by having a user press two physical buttons in combination on the portable electronic device, i.e., simultaneously pressing a first physical button and a second physical button. Therefore, compared to the prior art, the embodiment better provides ideal concealment and convenience. That is to say, the embodiment satisfies the requirement of secretively inputting Morse code through the portable electronic device when a user is in a restricted environment such as an emergency.
The detailed description above is merely associated with the embodiments of the present invention, and such embodiments are not to be construed as limitations to the scope of the present invention.