The present invention relates to indirectly detecting a user input from an external input device.
In one embodiment, the invention provides a method of indirectly detecting a user input. The method includes running an operating system on a computer device. The operating system receives information directly from an input device. The method also includes running an application module on the computer device. The application module is configured to receive information from the input device indirectly by monitoring changes to a textbox made by the operating system in response to information received from the input device. The method further includes generating a textbox by the application module, populating the textbox by the application module with a matrix of characters, and positioning a cursor at a predetermined starting location within the textbox by the application module. Furthermore, the method includes monitoring, by the application module, the textbox for changes caused by the operating system, detecting, by the application module, a change in a position of the cursor within the textbox, and performing, by the application module, a specific action in response to a direction of movement of the cursor.
In another embodiment the invention provides a computer device including a processor and a memory storing instructions that, when executed by the processor, cause the computer device to run an operating system. The operating system is configured to receive a user input from an external input device, communicate with an application module by changing the contents of a text box generated by the application module, and change a position of a cursor within the textbox generated by the application module in response to receiving an input from the external input device indicative of a pressing of the control key. The instructions, when executed by the processor also cause the computer to run the application module. The application module is configured to generate the textbox, populate the textbox with an initial matrix of characters, and position the cursor at a starting location within the textbox. The application module is also configured to determine whether the cursor shifts position within the textbox in response to a change made by the operating system, and perform an action when the application module determines that the cursor shifts position.
Other aspects of the invention will become apparent by consideration of the detailed description and accompanying drawings.
Before any independent embodiments of the invention are explained in detail, it is to be understood that the invention is not limited in its application to the details of construction and the arrangement of components set forth in the following description or illustrated in the following drawings. The invention is capable of other independent embodiments and of being practiced or of being carried out in various ways. Also, it is to be understood that the phraseology and terminology used herein is for the purpose of description and should not be regarded as limiting.
Use of “including” and “comprising” and variations thereof as used herein is meant to encompass the items listed thereafter and equivalents thereof as well as additional items. Use of “consisting of” and variations thereof as used herein is meant to encompass only the items listed thereafter and equivalents thereof.
Some computer devices provide an operating system by executing instructions stored on a non-transitory computer-readable memory. The operating system manages and integrates the capabilities of the computer device and serves one or more application modules by providing interaction with the various capabilities of the computer device. Application modules are provided by executing instructions stored on the non-transitory computer-readable memory of the computer device and perform specific tasks for the user. For example, a user may start an application module to send e-mails (e.g., an e-mail application), or to manage a presentation (e.g., PowerPoint®).
Many computer devices accept external input devices to receive user input to interact with the various application modules. The operating system in many computer devices receives a signal from the external input device indicating which key or keys were pressed on the external input device. The operating system then transmits the keyboard press information to the application module. The application module performs an appropriate action based on the key that was pressed by the user. For example, if the application module includes a presentation application, the user may press a forward arrow key to show a new presentation slide on a display of the computing device (e.g., the next slide).
Some computer devices (e.g., an IPAD®), however, execute an operating system that does not transmit keyboard press information directly to the application modules. Instead, the application modules on these computer devices create textboxes that are updated by the operating system in response to system inputs (e.g., user inputs from a keyboard). The application module then determines which characters have been inputted by analyzing the textboxes.
Such computer devices can receive inputs from two types of “keys”: a control key and an alphanumeric key. A control key refers to a key on the keyboard that does not include a displayable character (e.g., letters, numbers, and symbols). Rather, the control key performs a function. For example, an input from an arrow key moves the cursor, a backspace key deletes a preceding displayable character, a space key shifts the cursor forward, etc. Some control keys cannot be detected by analyzing the textbox because they do not cause a displayable change to the textbox. Because, in such computer devices, the application modules do not have direct access to keyboard press information, the application module does not receive any indication from the operating system when a control key is pressed instead of a displayable character.
Some application modules on such computer devices, however, would benefit from receiving information regarding the user's interaction with the external keyboard. For example, as discussed above, a presentation application may change slides when a particular key (e.g., an arrow key) is pressed. A method for an application module to indirectly detect when a user presses particular keys using an external input device is discussed below. The application module can then perform specific actions based on the user input from the external input device.
Each external input device 102 includes a plurality of keys 104. In some embodiments, the external input device 102 includes both displayable keys (i.e., characters, numbers, and symbols) and control keys (e.g., arrow keys, backspace, etc.), as in the case of the external keyboard 102A. In other embodiments, the external input device 102 (e.g., the remote presenter 102B and the remote control 102C) includes control keys, but few or no displayable characters.
In some embodiments, as illustrated in
As shown in
The output units 118 include components that provide feedback to the user. The output units 118 can include, for example, a display 126, speakers 128, a vibration device 130, etc. The computer device 100 may include more or less output units 118. The display 126 is configured to display graphical user interfaces generated by the processing unit 112 and may display user inputs (e.g., displayable characters). The display 126, the speakers 128, and the vibration device 130 may respond to user inputs based on instructions from the processing unit 112.
The processing unit 112 includes, among other things, a control unit 132, an arithmetic logic unit (“ALU”) 134, and a plurality of registers 136 (shown as a group of registers in
The memory 114 includes, for example, a program storage area and a data storage area. The program storage area and the data storage area can include combinations of different types of memory, such as read-only memory (“ROM”), random access memory (“RAM”) (e.g., dynamic RAM [“DRAM”], synchronous DRAM [“SDRAM”], etc.), electrically erasable programmable read-only memory (“EEPROM”), flash memory, a hard disk, an SD card, or other suitable magnetic optical, physical, or electronic memory devices. The processing unit 112 is connected to the memory 114 and executes software instructions that are capable of being stored in a RAM of the memory 114 (e.g., during execution), a ROM of the memory (e.g., on a generally permanent basis), or another non-transitory computer readable medium such as another memory or disc.
The computer device 100 provides an operating system by executing operating system instructions 140 stored in memory 114. The operating system 140 performs basic functions for the computer device 100. For example, the operating system 140 receives inputs from the input units 116, including, for example, from the external input device 102, sends output to the display 126 and the other output units 118, tracks files and/or directories on memory 114. In some embodiments, the operating system 140 may also determine which users are granted authorized access to the computer device 100. Examples of operating systems 140 include Linux, Windows, Android, iOS, BSD, OS X, QNX, IBM z/OS, etc. The operating system 140 also provides a software platform on which application modules (e.g., application programs) can operate.
The computer device 100 also provides at least one application module by executing application module instructions 142 stored in memory 114. When executed by the processing unit 112, the application module 142 interacts with the operating system 140 (provided concurrently by executing the operating system instructions 140). In the illustrated embodiment, the application module 142 includes a presentation application 142. The presentation application 142 allows a user to create a presentation, edit a presentation, and display a presentation. The presentation application 142 instructs the operating system 140 to generate a graphical user interface that allows the user to create, edit, and display presentations. For example, the presentation application 142 may allow a user to add a slide to the presentation, populate the slide with pictures, text, media, etc., change the order of the slide among the other slides in the presentation, and enter a view presentation mode in which the presentation is shown for presentation. The user can advance slides, go back slides, activate media objects, end the slideshow, etc. In other embodiments, the computer device 100 may store more application modules 142 and each application module may provide different functionality to the user. For example, the computer device 100 may alternatively or additionally include an e-mail application module, a word processing application module, a database application module, etc.
In the illustrated embodiment, the operating system 140 provides limited input information to the application module 142. For example, the operating system 140 receives user input through the external input device 102 and simply notifies the application module 142 when a textbox is updated or changed. Therefore, the application module 142 generates different textboxes, allows the operating system 140 to populate the textboxes, and then analyzes the content of the textboxes to determine which characters have been inputted by the user from the external input device 102.
In particular modes of the presentation application 142, the presentation application 142, however, also performs specific actions when certain control keys are pressed by the user. In the illustrated embodiment, the presentation application 142 enters the view presentation mode before performing actions associated with some control keys. While the presentation application 142 remains in the view presentation mode, the application module 142 continues to perform the specific actions when the application module 142 determines that the associated control keys are pressed. In other embodiments, the presentation application 142 may automatically perform specific actions when certain control keys are pressed regardless of the mode of the presentation application 142.
The presentation application 142 executes the method illustrated in
In response to entering the view presentation mode, the application module 142 generates a textbox 160 as illustrated in
The application module 142 then positions the cursor at a predetermined starting location (step 150). The starting location is at the center of the textbox 160. In other words, the cursor is positioned in the second character row between a first character column and a second character column as shown in
In other embodiments, the initial matrix of characters may have different dimensions. For example, in some embodiments, the textbox 160 may be populated with a two character columns and a single character row, as shown in
According to the method of
When the application module 142 determines that the cursor shifted position upward and the character matrix remains unchanged (see
As noted above, the operating system 140 updates the textbox based on user inputs. Therefore, in some embodiments, a user input from an alphanumeric key on a keyboard or a control key (e.g., a backspace) can also cause the operating system 140 to alter the contents of the text box. For example, as illustrated in
In some embodiments, the application module 142 stores a particular position shift of the cursor with a specific key press. In other words, the application module 142 may store a table that indicates that when the cursor shifts position upward and the character matrix remains unchanged, an upward key was pressed, etc. In other embodiments, the application module 142 may not store a table, but may instead store a set of rules that allow the application module 142 to determine which position shift of the cursor corresponds to which key press. Therefore, by tracking the position and the position shift of the cursor, the application module 142 determines if a key was pressed by the user, if the key pressed by the user is a control key, and in some instances, which control key was pressed by the user.
Once the application module 142 determines which key was pressed by the user on the external input device 102, the application module 142 performs an action associated with the particular key (step 156). As discussed above, the presentation application 142 may change the display to the next slide when a forward arrow is pressed by the user on the external input device 102, and may change the display to the previous slide when a backward arrow is pressed by the user on the external input device 102. Other application modules 142 may have different actions associated with the control keys detected by the application module 142 through the textbox 160. For example, an e-mail application may change the display to a next e-mail when the down arrow key is pressed by the user on the external input device 102. In some embodiments, the application module 142 may have a different action associated with each detected control key press. In other embodiments, the application module 142 may detect different control key presses, but may have an associated action with only a portion of the detected control key presses.
After the application module 142 analyzes the textbox information from the operating system 140, the application module 142 resets the cursor to the starting location (step 158) and repopulates the textbox with the initial matrix of characters (step 159), so that the next key pressed by the user is detected in a similar manner as described above. However, in other embodiments, the cursor is not reset to the starting location, but is instead tracked throughout the character matrix. In other words, the application module 142 compares the current position of the cursor within the textbox 160 with the previous position of the cursor. The application module 142 then continues to track the location of the cursor and determine which key was pressed by the user on the external input device 102.
Thus, the invention provides, among other things, a method for an application module to indirectly determine whether a particular key was pressed on an external input device based on the location of a cursor within a textbox. Various features and advantages of the invention are set forth in the following claims.