If you often need to type the same word or number into a document, you can set it up on a key so that you can enter it with a single key press. You can likewise set up a frequently used sequence of commands as a single key press.
1. Give the Define Key command:
Menu | Command | Ctrl-sequence | Key |
---|---|---|---|
Caret | Define key | CDK |
2. Click Select on the arrow icons until the key to which you want to assign the text appears in the right-hand box. The number in the left-hand box is the ASCII value of the key.
3. Type in the text string you want the key to produce.
4. Click the Enter.
button or pressFor example:
If you set the Key to define option to 121 y
and the Definition option to PipeDream
, then every time you press the y key the word PipeDream will be inserted into the current document.
To set the y key back to its original function:
1. Give the Define Key command.
2. Set the Key to define option to
121 y
.
3. Leave the Definition option blank.
4. Click the Enter.
button or pressA command sequence is defined in exactly the same way, by listing what you would type to issue the commands.
The differences are:
\
is used to represent the Ctrl-key. To split a line, for
example, you would type \ESL|M
.|M
after each command.If you want to include the Enter key in a sequence you should
enter it as \CEN|M
.
For example, if you set the Definition
option to PipeDream\CEN|Mby Colton Software
, when you press the
y key now, the following will appear on the screen:
PipeDream
by Colton Software
CEN
is the Ctrl-key sequence which is generated when the
Enter key is pressed.
You can find the Ctrl-key sequences for other caret movements in this Reference Guide. All other sequences appear on the menus, some on long menus only.
For example:
\ESL|M\CEN|M
splits the line before doing a carriage return.
The Define Function Key command enables you to redefine the effect of the function keys F1 to F12, with Ctrl-Fn, Shift-Fn and Shift-Ctrl-Fn variants. So, if you prefer a different function key layout, you can define your own.
As a simple example, give the Define Function
Key command. You will see the Function key
to define option in the dialogue box. Use this option to determine which
function key you want to redefine. Click Select on the up arrow icon. PipeDream
displays a list of the function keys F1
to F12
, then
Shift-F1
to Shift-F12
, then Ctrl-F1
to
Ctrl-F12
, and finally Shift-Ctrl-F1
to
Shift-Ctrl-F12
. Release the Select button when PipeDream gets to
Shift-Ctrl-F1
. If you overshoot, do not worry; simply click Select
on the down arrow icon until you get back to it.
The Definition option is where you specify what you want PipeDream to do when you press Shift-Ctrl-F1. Type in
The cat sat on the mat
and click the Enter.
button or pressNow press Shift-Ctrl-F1. You will see that PipeDream enters the string just as if you had typed it at the keyboard.
The Define Command command enables you to redefine the key sequences. It is only useful for those of you using foreign language versions of PipeDream.
For example, if you want Ctrl-Q to perform an Edit Formula command (Ctrl-X), specify:
Command to define X
Define as Q
Now, when you press Ctrl-Q, the Edit Formula command is carried out.
Think carefully before redefining the Ctrl-key sequences in this way.
Remember that PipeDream uses the letters F, E, L, P, B, C and S as the first character of multiple key commands and so if you redefine any of these, you will be affecting a lot of commands. Note that redefining keys in this way does not affect the backslash sequences in command files or keyboard redefinition. Neither do the redefined sequences appear on menus.
As well as using keyboard redefinition to enable you to enter common strings, you can also use it to configure your keyboard for foreign character sets, although you will probably prefer to use the international keyboard modules.
As an example, redefine the character #
to the produce the
character ¢
. Give the Define
Key command. On the Key to define
line, click Select on the down arrow icon until PipeDream displays 35
#
. Set the Definition option to
¢
by holding down the Alt key whilst you type 162
(the value for ¢ in the Latin1 font encoding) on the numeric keypad.
You should see ¢
appear in the Definition field. Click the button or press Enter to confirm the definition. Now press the
# key and PipeDream will enter ¢ in the current cell.
You may find it convenient to use the !Chars application.
For the numerical values for particular characters consult your RISC OS User Guide.
As well as redefining keys to produce strings or other characters, you can also redefine keys to perform PipeDream commands.
Imagine that you want to delete every alternate line in a file which is a
thousand lines long. One way to do this is to move to every alternate line and
delete it by pressing and giving the Delete
Row command repeatedly. But you would probably get rather tired of doing
this after a while and start making mistakes, deleting the wrong lines. There
is a better way. Load a file from which you do not mind deleting a few lines.
Give the Define Function Key command and
click Select on the arrow icons until the top line indicates
Shift-Ctrl-F2
. Type the following on the Definition line:
\Y|M\CCD|M
Now click the Enter to confirm the definition. Move to a paragraph of text and insert a blank line between every line in the paragraph. This will probably give you an idea of just how tedious deleting 500 alternate lines would be. The definition we entered tells PipeDream to perform a Delete Row command (Ctrl-Y) followed by a Caret Down command (Ctrl-CCD).
button or pressCheck this by looking at the Shift-Ctrl-F2 and you will see the line disappear and the pointer move down. Press Shift-Ctrl-F2 again and this time hold it down. You will see each blank line disappear. If you delete some text by mistake, you may be able to recover these lines by defining another function key to insert lines and paste.
menu and this Reference Guide. This Reference Guide contains a list of all the command sequences which do not appear anywhere on the long menus. Now move to the first blank line that you have just inserted. PressTo redefine a key to its original definition, simply define the key with a blank definition string, or one composed entirely of spaces.
For information on | See |
---|---|
Redefining your whole keyboard layout | Command Files |