|
When testing your applications, you'll find yourself using the remote
control a great deal. However, there is no need to wear out your
remote buttons or your thumb. The Cascade API provides a class to let
us simulate remote keypresses. By reading from the console, we can
create an application that simulates the remote control.
The most important class is
In this application we'll read from the Linux console. Normally when
getting keystrokes, input is buffered until return is pressed. We
allow each key to be processed as it is entered in the
In the main function we loop getting characters entered on the console. For different keys, we simulate different remote control buttons. When you run this application on the PhotoBridge, you can use i, j, k, and l to navigate and space to select. The is no need to wear out the batteries in your remote or your thumb any more! |
Copyright © 2024 Andrew Oliver