Summary of the invention
In view of this, be necessary to provide a kind of mobile handsets, can under different working modes, adopt diverse ways control directionkeys, convenient flexibility ratio of regulating directionkeys.
In view of this, also be necessary to provide a kind of directionkeys control method, be used under different working modes, controlling directionkeys, convenient flexibility ratio of regulating directionkeys.
Mobile handsets in the embodiment of the present invention is used for adopting diverse ways control directionkeys under different working modes, described mobile handsets comprises mode of operation selection module, scan module, judge module, composite module and operational module.Mode of operation selects module that the current mode of operation of mobile handsets is set, and wherein mode of operation comprises game mode and handset mode.Whether scan module scans a plurality of directionkeys and judges has at least one directionkeys to be triggered in the time period.When having at least one to be triggered, judge module judges the mode of operation of mobile handsets in scanning a plurality of directionkeys.Composite module draws a combinations of directions according to the described both direction key that is triggered at first when mobile handsets is in game mode and have at least the both direction key to be triggered in the described time period.Operational module is carried out corresponding operation according to described combinations of directions.
The method of the directionkeys control in the embodiment of the present invention is used for mobile handsets, and described directionkeys control method may further comprise the steps: the mode of operation of mobile handsets is set, and wherein mode of operation comprises game mode and handset mode; Scan a plurality of directionkeys of described mobile handsets, and judge whether have directionkeys to be triggered in the time period; If there is directionkeys to be triggered, then judge the residing mode of operation of mobile handsets; If be in game mode, whether the number of then judging the directionkeys that is triggered in the time period is greater than one; If greater than one, then the direction according to the both direction key that is triggered at first in the time period draws a combinations of directions; Carry out corresponding operation according to combinations of directions; And, then carry out corresponding operation according to the directionkeys that is triggered at first in the time period if be in handset mode.
Mobile handsets in the embodiment of the present invention and directionkeys control method thereof judge that by judge module the function that the residing mode of operation of mobile handsets decides the direction keyboard to carry out eight directions still is the function of four direction, realized user's requirement to the flexibility ratio of directionkeys under different working modes easily.
Embodiment
See also Fig. 2, be depicted as the module map of mobile handsets 10 1 execution modes of the present invention.In the present embodiment, mobile handsets 10 comprises screen 110 and keyboard 120, and wherein said keyboard 120 comprises direction keyboard 1202.In the present embodiment, comprise upper and lower, left and right four direction button on the direction keyboard 1202.In the present embodiment, mobile handsets 10 also comprises mode of operation selection module 130, scan module 140, judge module 150, composite module 160, operational module 170, processor 180 and memory 190.Processor 180 is used for carrying out the mode of operation that is stored in memory 190 and selects module 130, scan module 140, judge module 150, composite module 160 and operational module 170, and will export accordingly and be presented on the screen 110.
In the present embodiment, mode of operation selects module 130 that the current mode of operation of mobile handsets 10 is set, and wherein mode of operation comprises game mode and handset mode.
In the present embodiment, scan module 140 scans described direction keyboards 1202 and judges whether direction keyboard 1202 has at least one directionkeys to be triggered in the time period.In the present embodiment, whether scan module 140 changes to the current potential of keyboard 1202 all directions keys by the detection side judges whether to be triggered, if a certain directionkeys is triggered, then the current potential of this directionkeys becomes electronegative potential by high potential.
Judge module 150 scans the mode of operation of judging mobile handsets 10 when directionkeys is triggered at scan module 140.In the present embodiment, judge module 150 is by judging whether games in the mobile handsets 10 are in opening and judge whether the mode of operation of mobile handsets 10 is game mode.In the present embodiment, whether the directionkeys that is triggered in the judgement time section when described mobile handsets 10 is in game mode of scan module 140 is greater than one.In the present embodiment, the shake time when this time period presses greater than directionkeys is as 50ms.
Composite module 160 draws a combinations of directions according to the both direction key that is triggered at first when mobile handsets 10 is under the game mode and have at least the both direction key to be triggered in the described time period.In the present embodiment, the both direction key that is triggered should be adjacent both direction key, therefore, and combinations of directions comprises upper left, lower-left, upper right and upper right, and the corresponding unique control command of each combinations of directions.Hence one can see that, and mobile handsets 10 direction keyboard 1202 under game mode can be realized the function of eight directions.
Operational module 170 is carried out corresponding operation according to composite module 160 combinations of directions.In the present embodiment, if the directionkeys that is triggered in the described time period is not two, but one, this directionkeys that is triggered of 170 bases of operational module this moment is carried out corresponding operation, the operating result of processor 180 control screen display operation modules 170.
In the present embodiment, judge module 150 is not in game module following time at mobile handsets 10 and judges whether this mobile handsets 10 is under the handset mode.In the present embodiment, judge module is by judging whether mobile handsets 10 is in mobile phone interface and judges whether this mobile handsets 10 is in handset mode.
In the present embodiment, operational module 170 is in the directionkeys that handset mode following time is triggered in according to this time period at first at mobile handsets 10 and carries out corresponding operation.Hence one can see that, and mobile handsets 10 direction keyboard 1202 under handset mode is only realized the function of four direction.
Mobile handsets 10 in the embodiment of the present invention is triggered to have determined whether directionkeys by scan module 140 scanning direction keyboards 1202, the function that the mobile handsets 10 residing mode of operations of judging judge module 150 decide direction keyboard 1202 to carry out eight directions still is the function of four direction, realized user's requirement to the flexibility ratio of directionkeys under different working modes easily.
See also Fig. 3, be depicted as the flow chart of directionkeys control method one execution mode of the present invention.This method is used for mobile handsets shown in Figure 2 10.When this mobile handsets is used, then carry out described directionkeys control method.
At step S200, mode of operation selects module 130 that the current mode of operation of mobile handsets 10 is set, and wherein mode of operation comprises game mode and handset mode.
At step S202, the direction keyboard 1202 of the described mobile handsets 10 of scan module 140 scannings.
At step S204, scan module 140 judges whether have at least one directionkeys to be triggered in a time period.In the present embodiment, whether scan module 140 changes to the current potential of keyboard 1202 all directions keys by the detection side judges whether to be triggered, if a certain directionkeys is triggered, then the current potential of this directionkeys becomes electronegative potential by high potential.
If there is directionkeys to be triggered, then at step S206, judge module 150 judges whether the mode of operation of mobile handsets 10 is game mode.In the present embodiment, judge module 150 is by judging whether games in the mobile handsets 10 are in opening and judge whether mobile handsets 10 is in game mode.
If game mode, then at step S208, scan module 140 judges that whether the number of the directionkeys that is triggered is greater than one in this time period.In the present embodiment, the shake time when this time period presses greater than directionkeys is as 50ms.
If greater than one, then at step S210, composite module 160 draws a combinations of directions according to the direction of the described both direction key that is triggered at first.In the present embodiment, the both direction key that is triggered should be adjacent both direction key, therefore, and combinations of directions comprises upper left, lower-left, upper right and upper right, and the corresponding unique control command of each combinations of directions.Hence one can see that, and mobile handsets 10 direction keyboards 1202 can be realized the function of eight directions under game mode.
At step S212, operational module 170 is carried out corresponding operation according to described combinations of directions.
If mobile handsets 10 is not in game mode, then at step S214, judge module 150 judges whether this mobile handsets 10 is under the handset mode.In the present embodiment, judge module is by judging whether mobile handsets 10 is in mobile phone interface and judges whether this mobile handsets 10 is in handset mode.
If mobile handsets 10 is in handset mode, then at step S216, operational module 170 is at mobile handsets 10 that directionkeys that handset mode following time is triggered in according to this time period at first is corresponding carries out corresponding operation.Hence one can see that, and mobile handsets 10 direction keyboard 1202 under handset mode is only realized the function of four direction.
If the number of the directionkeys that is triggered in the time period is not more than one, then at step S218, operational module 170 is carried out corresponding operation according to this directionkeys that is triggered, the operating result of processor 180 control screen display operation modules 170.
Mobile handsets 10 in the embodiment of the present invention and directionkeys control method thereof are triggered to have determined whether directionkeys by scan module 140 scanning direction keyboards 1202, the function that the mobile handsets 10 residing mode of operations of judging judge module 150 decide direction keyboard 1202 to carry out eight directions still is the function of four direction, realized user's requirement to the flexibility ratio of directionkeys under different working modes easily.