The present disclosure relates to an electronic device and a method for controlling application to execute an input command of the electronic device.
In modern computing devices, multitask operating operations are widely used and the computing devices allow multiple programs to run simultaneously. Typically, only one of the running applications can receive an input command in response to an input of a user and execute an operation associated with the input command. The other running applications cannot receive the input command.
Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The input unit 10 is connected to the processing unit 20 and generates an input command in response to an input operation of a user. The input command can be a share command or a general input command depending on the type of the input operation. For example, the share command is generated in response to a predefined input operation A, and the general command is generated in response to other input operations that are different from the input operation A. The share command is to control two currently running applications to share a same general input command.
The processing unit 20 can include a determination module 21, an identification module 22, a reception module 23, a copy module 24, and a control module 25.
The determination module 21 determines if the input unit 10 generates a share command. When the input unit 10 generates a share command, the identification module 22 indentifies the current applications running on the electronic device 100. The current running applications can include an application running in the foreground that currently has the input cursor (hereinafter “foreground application”) and at least one application running in the background that currently does not have the input cursor (hereinafter “background application”). In at least one embodiment, the foreground application is a first office word document; one of the at least one background application is a second office word document.
The reception module 23 receives general input commands and the copy module 24 copies the general input commands if the input unit 10 has generated the share command.
The control module 25 controls the foreground application to execute the general input commands received by the reception module 23 and further controls one background application to execute the same general input commands copied by the copy module 24.
In an alternative embodiment, the identification module 22 identifies one or more background applications that can receive general input operations of a user. In at least one embodiment, the identification module 22 identifies a background application receiving general input operations of a user when the background application has at least one input function. If only one background application can receive general input operations of a user, the control module 25 controls the background application to execute the copied command. If more than one background applications can receive general input operations of a user, the identification module 26 further identifies the operation frequency of each of background applications. In the embodiment, the operation frequency of a background application is the frequency that the application is manipulated by the user in a predefine time length. The control module 25 also controls the background application with the highest operation frequency to execute the copied general input commands.
In block 401, the determination module determines whether the input unit generates a share command associating with an input operation of a user. If a share command is generated, the process goes to block 402; if a share command is not generated, the process ends.
In block 402, the identification module identifies the currently running applications running on the electronic device 100. The current running applications can include a foreground application and at least one background application.
In at least one embodiment, the second control module identifies one or more background applications that can receive general input operations of a user. If more than one background application can receive input operations of a user, the second control module identifies the operation frequency of each of background applications.
In block 403, the reception module receives general input commands, the copy module copies the general input commands after the share command.
In block 404, the control module controls the foreground application to execute the general input commands received by the reception module and controls one background application to execute the general input commands copied by the copy module .
In at least one embodiment, if only one background application can receive general input operations of a user, the control module 25 controls the background application to execute the copied commands. If more than one background application can receive input operations of a user, the control module 25 controls the background application with the highest operation frequency to execute the copied commands.
The electronic device 100 copies the input commands and controls one of the background applications to execute the copied input commands, thus two running applications share an input command, reducing the number of input operations.
Although the present disclosure has been described in considerable with reference to certain preferred embodiments thereof, the disclosure is not for limiting the scope of the present disclosure. Persons having ordinary skill in the art can make various modifications and changes without departing from the scope and spirit of the disclosure. Therefore, the scope of the appended claims should not be limited to the description of the preferred embodiments described above.
Number | Date | Country | Kind |
---|---|---|---|
2013101601580 | May 2013 | CN | national |