Thus, themkeys enable two cursor keys to move the cursor in any of four different directions: left, right, up, and down. To select horizontal movement, do not use alkey. To select vertical movement, you must use alkey.

Scrolling

Something special happens when you try to move the cursor beyond the edge of the LCD screen. The cursor doesn’t move off the screen; instead, the cursor stays in place and the text on the screen moves in the opposite direction.

To see how this works, move the cursor down to the bottom row of the screen. When you try to move the cursor down one more time, the cursor doesn’t move-instead, all the text on the screen scrolls up. In a similar manner, trying to move the cursor off the top or right edge of the screen will cause the text to scroll appropriately.

This scrolling demonstrates that the LCD screen is acting as a window onto the virtual screen. You can move the cursor anywhere you like within the virtual screen, and the text will scroll automat- ically, whenever necessary, to keep the cursor in view.

You can also scroll text with the q key. Press the q key and text moves down the screen. Hold down am key and press q , and text scrolls up the screen. Whether you use q or m/m, you will note that the cursor remains in its position on the LCD screen. (However, because q and m/I/ISCRWJ scroll the text vertically, they each move the cursor to a new line in the virtual screen.)

If you keep pressing the q key, you will discover at some point that it has no effect. This occurs when the LCD screen is displaying the top of the virtual screen.

Similarly, if you press m/I/(SCM enough times, at some point the LCD screen will display the bottom of the virtual screen. Pressing m/I/(SCRNI will then have no effect.

Homing the cursor

At any point you can move the cursor to the upper left corner of the virtual screen, by homing the cursor. To home the cursor, hold down alkey and press this key:

The LCD window will display the upper left portion of the virtual screen, and in the upper left corner of the window you will see the cursor. Bear in mind that homing the cursor does not change any of the text in the virtual screen, although it may cause a different portion of the virtual screen to appear in the window.

40