C H A P T E R 8
Text and Ink Input and Display
Key dimensions are specified by summing a combination of horizontal and vertical
key unit constants within the
. For example, to specify a key that
is 2 3/4 units wide by 1 1/2 units high, specify these constants for
keyHUnit*2 + keyHQuarter*3 + keyVUnit + keyVHalf
Using the Keyboard Registry
If your application includes its own keyboard, you need to register it with the system
keyboard registry. This makes it possible for the system to call any keyboard-related
functions that you have defined and to handle the insertion caret properly.
method of a view is for registering a keyboard for
use with that view.
method of a view to remove the keyboard
view from the registry. If the insertion caret is visible, calling this method hides it.
The system automatically unregisters the keyboard when the
registered view is hidden or closed. The protokeypad proto
also automatically handles registration for you in its
. You do not need to call the
method in these cases.
You can use the
function to open a context-sensitive keyboard
for a view. This function first attempts to open the keyboard defined in the view's
slot. If the view does not define a keyboard in that slot,
determines if the view allows only a single type of input, such
as date, time, phone number, or numbers. If so,
appropriate built-in keyboard for that input type. If none of these other conditions
keyboard for the view.
The Newton System Software uses the
function to open a context-sensitive keyboard when the user
double-taps on a view in which a
slot is defined.
Theses methods and functions, as well as several others you can use with the
keyboard registry in your applications, are described in "Keyboard Registry
Functions and Methods" (page 7-44) in Newton Programmer's Reference.
Defining Tabbing Orders
You can define the tabbing order for an input view with the
which contains an array of view paths.