The user keyboard: customizing key presses, User mode – HP Prime Graphing Wireless Calculator User Manual

Page 260

Advertising
background image

256

Programming in HP PPL

FOR k FROM 1 TO n DO

ROLLDIE(sides)+ROLLDIE(sides) ▶ roll;

results(roll)+1 ▶ results(roll);
END;

RETURN results;
END;
ROLLDIE(N)
BEGIN
RETURN 1+RANDINT(N-1);
END;

In Home view you would enter ROLLMANY(100,6)

L5

and the results of the simulation of 100 rolls of two six-
sided dice would be stored in list L5.

The User Keyboard: Customizing key presses

You can assign alternative functionality to any key on the
keyboard, including to the functionality provided by the
shift and alpha keys. This enables you to customize the
keyboard to your particular needs. For example, you
could assign

e

to a function that is multi-nested on a

menu and thus difficult to get to on a menu (such as
ALOG).
A customized keyboard is called the user keyboard and
you activate it when you go into user mode.

User mode

There are two user modes:

Temporary user mode: the next key press, and only
the next, enters the object you have assigned to that
key. After entering that object, the keyboard
automatically returns to its default operation.
To activate temporary user mode, press

SW

(User). Notice that 1U appears in the title bar. The 1
will remind you that the user keyboard will be active
for just one key press.

Persistent user mode: each key press from now until
you turn off user mode
will enter whatever object you
have assigned to a key.

Advertising