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.
Menu | Command | Tool | Key | Cmd-sequence |
---|---|---|---|---|
Caret | Define key | CDK |
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:
121 y
.A 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 .
If you want to include the Return↵ 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 Return↵ key is pressed.
You can find the Ctrl-key sequences for other caret movements in the Commands section of this Reference Guide. All other sequences appear on the menus, albeit some on long menus only.
\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. Press and hold 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 when PipeDream gets to Shift-Ctrl-F1. If you overshoot, do not worry; simply click 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 Return↵).
button (or pressNow press Shift-Ctrl-F1. You will see that PipeDream enters the text 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 (Cmd-X), specify:
Command to define Q
Define as X
Now, when you press Ctrl-Q, the Edit Formula command is carried out.
Think very 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 when Classic menus are selected 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 command sequences in command files or keyboard redefinition. Neither do any such 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 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 Return↵) 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 the up / down arrow buttons until the top line displays Shift-Ctrl-F2. Type the following in the Definition input field:
\Y|M\CCD|M
Click the Return↵) 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 (Cmd-Y) followed by a Caret Down command (Cmd-CCD).
button (or pressCheck this by looking at the Commands section of 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. Press 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. TheTo 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 |