Abstract:
The present invention discloses a method to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure with many layers. These virtual keys can control an application program and include at least one function group key and at least one command key The method includes the following steps. The first step is to determine whether a first virtual key is a function group key or a command key, wherein the first virtual is located in a first layer in the hierarchical structure. When the first virtual key is a command key, the first virtual key is moved from the first layer to another layer and a number to select the first virtual key is added by one. Next, whether or not the application program processing has ended is determined. When the application program processing has ended, the number of times the first virtual key is clicked is compared to the number of times other virtual keys were selected. A virtual key that is clicked the most is moved to the top layer in the hierarchical structure.

Description:
RELATED APPLICATIONS 
       [0001]    The present application is based on; and claims priority from, Taiwan Application Serial Number 97142697, filed Nov. 05, 2008, the disclosure of which is hereby incorporated by reference herein in its entirety. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to an arrangement method and apparatus, and especially to a method and apparatus to dynamically arrange a virtual key position in a hierarchical structure. 
       BACKGROUND OF THE INVENTION 
       [0003]    With progress in technology, lighter and smaller products have become basic requirements for portable electronic devices. However, a physical keyboard occupies a large area in a portable device. It is unfavorable to design a portable device to use a physical keyboard in the portable device. Therefore, a virtual keyboard is developed to solve the foregoing problems. A display of the portable device can shown the virtual keyboard to provide a user to control any software. 
         [0004]    A complicated virtual keyboard structure is required to operate software with many functions. The first kind of a virtual keyboard structure shows all function keys in the display to enable a user to select and operate. The second kind of virtual keyboard structure classifies the function keys into classes. Then, the function keys classified in the same class are arranged in a virtual keyboard structure in a hierarchical structure. When a user wants to use a special function, he needs to select a class, and then, to select a key under the class to operate the function. 
         [0005]    Although the first kind of a virtual keyboard structure provides all, function keys in the display for a user to directly select the function, such a structure cannot have unlimited increases in the number of function keys because the display area is limited. In other words, the first kind of virtual keyboard structure only provides control software with limited functions. Therefore, the present portable device uses the second kind of a virtual keyboard structure. However, such structures still has many drawbacks. For example, a hierarchical structure can have many layers. A frequently used function key is arranged in a lowest layer in the hierarchical structure to cause inconvenient use. 
         [0006]    Therefore, an apparatus and a method that can resolve the foregoing problems are needed. 
       SUMMARY OF THE INVENTION 
       [0007]    Therefore, the present invention provides a method and apparatus to dynamically arrange a virtual key position in a hierarchical structure. 
         [0008]    In accordance with the foregoing purpose, the present invention discloses a method to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure with many layers. These virtual keys can control an application program and include at least one function group key and at least one command key. The method includes the following steps. The first step is to determine whether a first virtual key is a function group key or a command key, wherein the first virtual key is located in a first layer in the hierarchical structure. When the first virtual key is a command key, the first virtual key is moved from the first layer to another layer in the hierarchical structure. A number to select the first virtual key is added by one. Next, a determination step is performed to determine whether or not the application program processing is ended. When the application program processing is ended, the number to select the first virtual key is compared with the other numbers to select other virtual keys. Then, a virtual key that has the biggest selected number is moved from a layer the virtual key located to another layer in the hierarchical structure. 
         [0009]    Moreover, the present invention discloses an apparatus to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure with many layers. These virtual keys can control an application program and include at least one function group key and at least one command key. The apparatus includes a first determination module to determine if a first virtual key is a function group key or a command key, a calculation module to move the first virtual key from the first layer to another layer in the hierarchical structure when the first virtual key is a command key and a number to select the first virtual key is added by one, a second determination module to determine whether or not the application program processing is ended, and an arrangement module to compare the number to select the first virtual key with the other numbers to select other virtual keys when the application program processing is ended and to move a virtual key from a layer the virtual key located to another layer in the hierarchical structure. 
         [0010]    Accordingly, the apparatus and method can dynamically arrange virtual key positions in a hierarchical structure based on the usage frequency of a virtual key. A virtual key that is most frequently used is arranged on the top layer in a hierarchical structure. Therefore, a user can directly select this virtual key in the display. Such a method and apparatus can save time when this user wants to use this virtual key again because it is not necessary for the user to search the virtual key in the hierarchical structure. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]    The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same becomes better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein: 
           [0012]      FIG. 1  is a hierarchical structure of virtual keys. 
           [0013]      FIG. 2  is a flow chart to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure. 
           [0014]      FIG. 3  is a schematic diagram of a command key shown in the display of the present invention. 
           [0015]      FIG. 4  is an apparatus to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0016]    The present invention provides a method and an apparatus to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure. Although the virtual keys are also arranged in a hierarchical structure, each virtual key is not always located in a layer. A virtual key that is used the most frequently is dynamically moved from the virtual key originally located layer to the top layer in a hierarchical structure. Therefore, a user can directly click this virtual key in the display. When this user wants to use this virtual key again, it is not necessary for the user to search for the virtual key in the hierarchical structure. 
         [0017]      FIG. 1  is a hierarchical structure of virtual keys according to an embodiment of the present invention. Each virtual key corresponds to a function of an application program. For example, virtual key A controls a command A function and virtual key B controls a command B function. In the following paragraphs, a command A key represents the virtual key A, a command B key represents the virtual key B and a command C key represents the virtual key C. In  FIG. 1 , the top layer, the first layer, of the hierarchical structure includes a command F key and a first function group key. The second layer of the hierarchical structure includes a command A key, a command B key, a command C key and a first subgroup key. The bottom layer, the third layer, of the hierarchical structure includes a command D key and a command E key. The command A key, the command B key, the command C key and the first subgroup key belong to the first function group key. That is when a user clicks the first function group key, the command A key, the command B key, the command C key and the first subgroup key are displayed in the display. Then, the user can click a key to active its function. The command D key and the command E key belongs to the first subgroup key. 
         [0018]    According to the hierarchical structure, typically, when the application program is started, the keys arranged in the top layer are shown in the display first. Therefore, when a user wants to click the command E key, the user needs to click the first function group key to enter the second layer of the hierarchical structure. Then, the user clicks the first subgroup key to enter the third layer of the hierarchical structure. Finally, the user can click the command E key to use the corresponding function. Such wastes time in switching the layers to search for the command E. And, if a wrong virtual key is clicked when searching for the command E key, a new searching process needs to be performed again. 
         [0019]    In this present invention, if the command E key is used very frequently, the command E key is dynamically moved from the third layer to the top layer in a hierarchical structure. A user can directly select this command E key in the top layer. Therefore, it is not necessary for the user to perform the selecting process from the first function group key, the first subgroup key to the command E key. 
         [0020]      FIG. 2  is a flow chart to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure. Referring to  FIG. 1  and  FIG. 2 , the flow  100  includes a step  101  to start an application program. 
         [0021]    Next, in step  102 , a determination step is performed to determine a virtual key clicked by a user is a function group key or a command key. In this embodiment, that is to determine a virtual key clicked by the user is the first function group key or the command F key. 
         [0022]    When the user clicks the first function group key, the keys arranged in the second layer of the hierarchical structure are displayed in the display in step  103 . In this embodiment, the command A key, the command B key, the command C key and the first subgroup key are displayed in the display. Then, the user can clicks a key to active its function. If the user wants to select the function corresponding to the command E key, the user needs to click the subgroup key to enter the third layer of the hierarchical structure in step  104 . In this embodiment, the command D key and the command E key are shown in the display in this step. 
         [0023]    Next, in step  105 , the user clicks a command key he wants. In this embodiment, the user wants to click command E key to use the corresponding function. Finally, in step  106 , the command E key is recorded as the final command key the user clicked. Moreover, the number of times the user clicks the command E key is incremented by one. Then, the command E key is moved from the third layer to the top layer of the hierarchical structure. In another embodiment, the command E key can replace a command key that was moved to the top layer before. For example, if the command F key is moved to the top layer before, the command E key will replace the command F key. Therefore, the user can directly select this command E key in the top layer. It is not necessary for the user to perform the selection process from the first function group key, the first subgroup key to the command E key. 
         [0024]    On the other hand, the number of times the user clicks the command E key is recorded in a memory to compare with the numbers that the user clicks the command A key, the command B key, the command C key and the command D key. In an embodiment, a counter is used to record the number of clicks. When the flow  100  finishes, the command key that has the highest number is moved to the top layer in step  110 . In other words, when the application program is started again, the top layer of the hierarchical structure includes the first function group key and this command key that has the biggest clicking number. 
         [0025]    In step  108 , a determination step is performed to determine whether or not a same command key is clicked by the user. In this embodiment, that is to determine whether or not the command E key is clicked again. If the user clicks the command E key again, the user can directly select this command E key in the top layer. It is not necessary for the user to perform the selecting process from the first function group key, the first subgroup key to the command E key. 
         [0026]    On the other hand, if the user does not click the command E key again, step  109  is performed to determine whether or not the application program has ended. If the application program has ended, step  110  is performed. In step  110 , the number of clicks is recorded in step  106  and the number of times the command keys are clicked is then compared. The command key that has the biggest clicking number is moved to the top layer in step  110 . In an embodiment, recorded in step  106 , the command F key was clicked 10 times. The command E key was clicked 12 times. The command A key was clicked 9 times. Then, the command E key is moved from the third layer to the top layer. In another embodiment, the command E key replaces the command F key. Therefore, when the application program is started again, the top layer of the hierarchical structure includes the first function group key and this command E key. Finally, the flow  100  ends in step  112 . 
         [0027]    On the other hand, if the application program does not end in step  109 , step  101  is performed again. And, step  102  is performed to determine whether the virtual key clicked by a user is a function group key or a command key. In this embodiment, because the command E key is moved to the top layer, step  102  is determined to be a virtual key clicked by the user is the first function group key or the command E key. If the user clicks the command E key, a corresponding function is performed in step  107 . Next, step  108  is performed to determine whether or not the command E key is clicked again. If the user clicks the command E key again, the corresponding function of the command E key is performed in step  107 . On the other hand, if the user does not click the command E key again, step  109  is performed to determine whether or not the application program has ended. If the application program has ended, step  110  is performed. In step  110 , the clicking numbers recorded in step  106  of command keys are compared to each other. The command key that has the biggest clicking number is moved to the top layer in step  110 . Finally, the flow  100  is ended in step  112 . 
         [0028]      FIG. 3  is a schematic diagram of a command key shown in the display of the present invention. The name of a command key is shown in the frame  301 . An expanded Menu is connected to frame  302 . In an embodiment, when a user clicks the frame  302 , function keys corresponding to the command key and located in the next layer are shown in the display. 
         [0029]      FIG. 4  is an apparatus to dynamically arrange positions of a plurality of virtual keys in a hierarchical structure. The apparatus  400  includes a first determination module  401 , a second determination module  402 , a third determination module  403 , an arrangement module  404 , a display module  405  and a calculation module  406 . 
         [0030]    When an application program is started, the first determination module  401  determines whether a virtual key clicked by a user is a function group key or a command key. If the user clicks a function group key, the display module  405  displays keys of the function group in the display. If the user clicks a command key, the display module displays a corresponding function in the display. The calculation module  406  records the command key as the finally used command key and adds  1  to the number to click the command key. Then, the command key is moved to the top layer of the hierarchical structure. In another embodiment, the command key can replace a command key that was moved to the top layer before. Moreover, when the application program is ended, the arrangement module  404  moves the command key that has the biggest number recorded in calculation module  406  to the top layer of the hierarchical structure. In other words, when the application program is started again, the top layer of the hierarchical structure includes the first function group key and this command key that has the biggest clicking number. 
         [0031]    The apparatus further comprises a second determination module  402  to determine whether or not a same command key is clicked by the user. In an embodiment, that is to determine whether or not the command E key is clicked again. If the user clicks the command E key again, the user can directly select this command E key in the top layer. It is not necessary for the user to perform the selecting process from the first function group key, the first subgroup key to the command E key. 
         [0032]    The apparatus further comprises a third determination module  403  to determine whether or not the application program has ended. If the application program is ended, the arrangement module  404  moves the command key that has the biggest number recorded in calculation module  406  to the top layer of the hierarchical structure. On the other hand, If the application program has not ended, the first determination module  401  determines if a virtual key clicked by a user is a function group key or a command key. 
         [0033]    Accordingly, the apparatus and method can dynamically arrange a virtual key position in a hierarchical structure based on a use frequency of a virtual key. A virtual key that has a highest use frequency is arranged on the top layer in a hierarchical structure. Therefore, a user can directly select this virtual key in the display. 
         [0034]    While the preferred embodiment of the invention has been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the invention.