Jaap's Psion II Page

FNKEY User Guide


The physical FNKEY 4.0 manual consists of the following parts:

On this web page I have tried to merge the texts of all these separate parts together to form a unified FNKEY version 4.0 manual.

To see the separate parts, reproduced verbatim, visit the FNKEY version 4.0 manual page.


FNKEY Version 4.0
For the Psion Organiser II
User Guide

September 1989
M Leigh

Cubsoft
6 Okeover Rd
Salford
M7 0JX
England
061-792-2871

Note: All rights reserved. You may not copy or reproduce this manual or the Fnkey software in part or in whole without express written permission being obtained from Cubsoft. You are permitted to load and use the Fnkey memory resident software in one machine only at a time. Every effort has bean made to ensure the accuracy of this manual and the correct functioning of the Fnkey software. However, should any error be detected in the manual or in the operation of the Fnkey software, Cubsoft would really appreciate being informed of them. The above notwithstanding, Cubsoft can assume no responsibly for any errors in this manual, defects within the Fnkey software or their consequences and will not in any event be liable for any loss consequential or otherwise arising from the use of the Fnkey software including but not restricted to loss of saved data, loss of programs (in object or source form), loss of profit or loss of contract.

Note: Xbase is a database and diary maintenance package which may be obtained from Cubsoft.

Copyright © 1987-91 CubSoft, 6 Okeover Rd, Salford M7 0JX.


Contents
Part I - The Fnkey Keyboard Driver

1 Introduction 1.1 Overview 1.2 Memory resident software 1.3 Installation procedure 1.4 Removal procedure 1.5 Menu fixing 1.6 System capabilities 2 Hands On 2.1 Introduction 2.2 The mode key 2.3 Key clicks 2.4 The sample key files 2.5 The date key 2.6 Case inversion 2.7 Punctuation marks 2.8 Pound sign 2.9 Break character 3 Keyboard Macros 3.1 Making a recording 3.2 Replaying a recording 3.3 Saving a recording to a key 3.4 Replaying a saved recording 3.5 Deleting a saved recording 3.6 Deleting all recordings 4 Cut and Paste 4.1 Introduction 4.2 Line mode 4.3 Word mode 4.4 Moving copying & pasting 4.5 New lines 4.6 Multiple operations

Contents
Part II - The Key Utility Program

5 Viewing Recordings - view 5.1 Viewing recordings 5.2 Deleting recordings 5.3 Copying recordings 6 Using Key Files 6.1 Introduction 6.2 Loading key files - load 6.3 Saving key files - save 6.4 Backup and restore - back & rest 6.5 The key file directory - pack 6.6 Deleting key files - kill 6.7 Character files - dump 6.8 Language files - LANG 6.9 Viewing unused keys and buffer space - Free 6.10 Viewing recording buffer - Xvue 7 Configuration Options 7.1 Introduction - cnfg 7.2 The hot key 7.3 Cm and paste 7.4 Key clicks 7.5 (Deleted) 7.6 Special characters - edit 7.7 Date options 7.8 Accessing Load in a macro 8 Compatibility and Error Messages 8.1 The XP and CM 8.2 The LZ and LZ64 8.3 Older versions 8.4 Error messages 9 Quick Reference Chart 10 Miscellaneous 10.1 Drive selection 10.2 Bank switching 10.3 Cap and num locks 10.4 Application interface


Section 1 - Introduction

1.1 Overview

The purpose of this introductory chapter is to explain the components of the Fnkey software and describe the installation procedures.

There are four components to the Fnkey software :

  1. The Installation Program

    This is a short program which you will find on the Fnkey datapack used to install (and remove) the Fnkey memory resident software.

  2. The Fnkey keyboard driver

    The heart of the Fnkey software package. This program takes over part of the responsibilities of the operating system for handling key strokes.

  3. The Key utility program

    A memory resident utility program which allows you to save copies of work you have done either for security purposes or as a series of customised setups for use in specific situations. Also permits you to configure certain aspects of the way Fnkey operates.

  4. 4. Customised Setup Files

    Three predefined key files are provided for your convenience and are used to illustrate examples in the manual.

The Fnkey datapack which is copy (but not write) protected has about 12K of unused space which you may use to store key files or other data.

1.2 Memory Resident Software

Software which may be installed permanently in RAM is termed memory resident software (MRS). Running MRS offers considerable advantages over conventional application software written in OPL:

  1. MRS is always written in assembler and hence executes an order of magnitude faster than an equivalent OPL procedure.
  2. An MRS application because it is written in assembler can call on operating system services not normally available to OPL programmers.
  3. MRS may be used to supplement, enhance or replace parts of the Organiser's operating system.
  4. MRS does not need to be loaded into memory prior to execution, it is always available for instant execution. In contrast procedures written in OPL must be loaded into memory (even from the A drive) each time they are executed.
  5. Once an MRS application has been installed the datapack on which it is supplied may be removed granting free use of both datapack slots at all times.

Both the Fnkey keyboard driver (referred to henceforth simply as Fnkey) and the utility program are memory resident.

1.3 Installation Procedure

To install the Fnkey memory resident software proceed as follows:

  1. Check that your battery is in good condition.
  2. Remove all devices.

    The easiest way to do this is by removing any hardware attached to the top slot such as the Comms Link, removing all datapacks an then from the top level menu pressing on/clear once or twice.

  3. Insert the Fnkey datapack into drive B or C.
  4. Insert the word key into the top level menu and then run key from the menu.
  5. Press on/clear to clear the copyright message.
  6. Set the memory configuration.

You will now be presented with the memory configuration screen from which you can adjust the amount of buffer space available to Fnkey for storing keyboard macros.

Buffers 0 M:2439 421:R

This screen shows the number of additional buffers assigned to Fnkey, the amount of memory used by Fnkey and the amount of space available for storing recording.

Use the arrow keys to adjust the number of buffers allocated and then press on/clear to save the setting.

The default setting allows for individual recordings of up to 254 characters each to be made and can store up to 26 recordings with an average length of 15 characters each.

This setting should be adequate for most purposes, however here are some guidelines for increasing the amount of memory allocated to Fnkey.

  1. If you intend to make more than occasional use of the cut and paste facilities you should allocate at least two additional buffers.
  2. On a 32K XP, LZ or LZ64 if you use the Comms Link and wish both Fnkey and the Comms Link (when in use) to reside in low memory you should keep the total amount or memory used by Fnkey down to under 3K.
  3. Each buffer occupies 52 bytes and you can allocate up to 127 buffers (allowing you to store 26 recordings of 254 characters each).
  4. On a 32K XP, LZ or LZ64 if you allocate more than 7K of memory to Fnkey you will not be able to load Fnkey into low memory.
  5. On a CM in order to maximize the memory available on drive A do not alter the default setting.

    A sensible working allocation would be 4 buffers using just under 3K of memory.

  6. Select the memory partition (32K XP, LZ and LZ64 only).

Low High

Use the following guidelines to choose where to load Fnkey.

  1. If you are not using the Comms Link, or Spreadsheet (and have allocated less than 7K to Fnkey) select low memory.
  2. If you are using the Comms Link (but not the Spreadsheet) and have allocated less than 3K to Fnkey select low memory.
  3. If you have other memory resident software installed in low memory you will probably need to select high memory.
  4. If you are using the spreadsheet select high memory.

The default (10 buffer) configuration when you install FNKEY now requires just over 4K (approx 1K larger than version 3.5).

Due to the increase in size it is no longer possible to install FNKEY in low memory while leaving enough room for the Comms Link.

The installation process in now complete and you can remove the Fnkey datapack if you wish (you will need it however to access some of the sample key files as you work through the manual).

Fnkey may now be accessed via the mode key as explained in following sections of the manual.

To run the utility program (see Part II) select key from the main menu.

1.4 Removal Procedure

To remove the Fnkey memory resident software from your system:

  1. Remove the word key from the top level menu.
  2. Repeat steps 1 - 5 of the installation procedure.
  3. Select boot from the menu.

    Fix Boot

  4. The removal procedure in now complete.

1.5 Menu Fixing

If you accidentally delete key from the top level menu you will not be able to access the utility program. To remedy this situation:

  1. Repeat steps 3 - 5 of the installation procedure.
  2. Select fix from the menu.

    Fix Boot

  3. The word key in the top level menu will now give you access to the utility program.

You can use this method (first deleting key from the menu) to move the position of the utility program on the top level menu.

1.6 System Capacity

Default: Recordings up to 31 characters. Storage for up to 26 recordings of average size 15 characters (2.4K)

Maximum: Recordings up to 254 characters. Storage for up to 26 recordings of maximum size 254 characters (8.7K)

FNKEY 4.0 is both very much faster than previous versions and is now compatible with all organiser software with which it has been tested.

In particular FNKEY is now compatible with Autoscribe (Widget).

There seems to be a minor problem accessing Autoscribe from within a macro, the first letter of the filename you type after the initial prompt (just after the copyright notice) gets lost during replay.

There is a simple work around, before typing the file name press a key such as del or one or the cursor keys (anyway ignored by Autoscribe) when you make your recording, the macro will then replay as expected.


Section 2 - Hands On

2.1 Introduction

In this section of the manual we will explain the basic features of Fnkey illustrating some of the principles involved with examples from the key files calc and prog which may be found on the Fnkey datapack. We will also make use of the utility load and view functions.

2.2 The Mode Key

1. Command Sequences.

Fnkey replaces the Psion keyboard driver giving you a much wider range of facilities which you can access directly through the keyboard.

Fnkey is activated by pressing the mode key. Do it now (while at the top level menu) and holding the mode key down.

Note that (a) Nothing appears to happen and (b) there is no key click.

Now release the mode key. Still nothing happens (although Fnkey is now active and waiting for a further key press) but you will hear the key click.

Press and release the mode key. This should open an entry in the top level menu which you can remove by pressing on/clear.

There are two points to be brought out here:

  1. Fnkey command sequences which (except for cut and paste are initiated by pressing the mode key do not take effect until the relevant key is released. This is referred to as debounce (see also section 7.2).
  2. Because Fnkey is activated by pressing mode to get the genuine effect of the mode key you must either press the mode key twice or press shift mode.

Section 7.2 explains how to temporarily disable Fnkey so that the keyboard works as normal.

Section 7.2 also explains how you can reverse the roles of mode and shift mode so that the mode key works as normal and Fnkey is activated by pressing shift mode.

For the rest of this manual we will assume that the hot key which you will use to activate Fnkey is the mode key.

In addition to the mode key being used to active FNKEY the following keys are used by the cut and paste facility.

shift up use mode up up to toggle the cap lock
shift downuse mode down down to toggle the num lock

2. Cancelling Command Sequences.

If you get part way into a command sequence (which is always mode followed by one or two further key presses) you can press on/clear or del to cancel the command sequence.

It is preferable to use del to cancel a command sequence since software which tests the hardware directly for the on/clear key (for example most OPL programs) will detect the press of the on/clear key but not the del key.

3. The Utility Program.

When you use the utility program the hot key and the cut and paste keys are temporarily disabled. Pressing mode once in the utility program is equivalent to pressing mode twice when Fnkey is active.

If you try to access the utility program while recording is in progress or during replay an alarm beep will sound.

2.3 Key Clicks

In order to communicate the success or failure of Fnkey commands which you issue Fnkey makes adjustments to the duration of the key click.

  1. The normal key click sounds when you press keys which are not modified by Fnkey. Section 7.4 explains how to mute or double the length of the key click.
  2. While making a recording the length of the key click is increased and acts as a reminder that you are in recording mode.
  3. A warning beep may be issued when you execute certain command sequences.
  4. An error beep may be issued if you type an invalid command sequence or the command fails (due to insufficient memory).

Even if you mute the normal key click a click always sounds for each key press of an Fnkey command sequence.

2.4 The Sample Key Files

Select the utility program (key) from the top level menu, select load and type in calc followed by exe. This loads the calc file from the Fnkey datapack.

The calc file contains various mathematical functions (mainly of interest to scientists and engineers) and provides some examples of the use of function keys.

To examine the contents of the file select view. You should see the following display.

View A:7 72 ATAN()·

Use the exe key to examine the other function key assignments, then press A to return to the above display.

Press mode to bring up the following display.

View A:7 72 ······5

The recording assigned to the A key is made up two types of character, normal text (shown as = in the second display) and control codes such as on/clear, mode which are shown as = in the first display (5 is the representation for the left key).

Press mode to swap between the display modes. Press on/clear twice to quit the utility program.

Now select calc from the top level menu and press and release the mode key and then the A key. "ATAN()" should be displayed with the cursor positioned over the opening bracket ready for you to type in a number and press exe.

For a further example load the prog file, then examine and replay function key F (press mode F). Try pressing a key while replay is in progress (you should get an error beep). Try pressing on/clear during replay (which should cancel replay).

You may have noticed that the key click when you release the A or F keys does not come until replay is complete.

This is deliberate, if you press mode and then a letter and do not get any key click at all (and the keyboard goes dead) you have probably got a deadlock between the application program you are running and Fnkey. Pressing on/clear once or twice (and then Q if the application is an OPL program) will clear the deadlock. Deadlocks are quite rare. The following OPL code is an example of the sort of code which gives rise to a deadlock (no one should write code like this anyway).

test: do until 0 : rem a tight loop which does not test the keyboard.

The only way to break this program is by pressing on/clear and then Q. If you replay a function key while this program is running Fnkey will lock up. The on/clear key will unlock Fnkey. Pressing Q will then break into the OPL code.

Section 3 of the manual explains how you can make your own keyboard macros and assign them to keys A - Z. Section 6 of the manual shows you how to create your own key files.

2.5 The Date Key

From the calculator press mode space. The date will be replayed in American format yy-mm-dd.

Use the date key to add the current date when you save records with the top menu save (or Xbase save and data functions) and when entering data into the notepad (LZ).

The choice of American date format is deliberate. If you sort a series of records on a date field in American format (Xbase is good for this) they will automatically sort into correct chronological order.

There are two new date stamp macros.

mode shift spacereplays Jan, Feb, Mar,...
mode shift exe replays Sun, Mon, Tue,...

See section 7.7 for configuration options (mode space).

2.6 Case Inversion

From the calculator press shift down (to clear the num lock) or use the shift key to type ABCDE...

You will most likely get ABCDE... in upper case.

Now press in sequence:

mode up A mode up B mode up C ...

You should get abcde...

Use shift up (to clear the cap lock) and repeat the above steps. This time you should get abcde... followed by ABCDE...

The moral is mode up followed by a letter A - Z reverses the case of the letter. This is especially useful if you work in lower case and wish to capitalise a name or word.

2.7 Punctuation Marks

Again from within the calculator work through the sequences:

mode down A to mode down Z
mode down shift A to mode down shift Z

You should get []{}&\?...

Keys A - Z are paired with punctuation marks as follows:

A B C D E F G H L M N R S T X Y Z < > ( ) % / = " * , $ - ; : + 0 . [ ] { } & \ ? ` # ' @ _ ← → | ! ^

1-9 left unchanged.

Section 7.6 of the manual explains how you can assign foreign and special characters to keys 1 - 9 or indeed reassign values to the full range A-Z and shift A-Z.

2.8 Pound Sign

Pressing mode down space replays a pseudo pound sign on the XP and a genuine pound sign on the LZ. See also sections 8.1 and 8.2.

2.9 Break Character

Pressing mode up space replays the break character (a dot on the XP or an accented N on the LZ). Refer to the Xbase manual for further information on use of the break character.


Section 3 - Keyboard Macros

3.1 Making A Recording

In this example we will create a macro to calculate the Vat on a price. From the calculator type 100*1.15 and press exe to calculate the answer (115).

Note how that with each Vat calculation although the price may vary the *1.15 exe remains the same.

So new type 100 then press mode right to turn on macro recording.

Note how the key click changes. Type *1.15 exe and then press mode right again to stop recording. The key click should return to normal.

You can store up to 254 characters or key strokes in each recording. If as you type you exceed this limit an error beep will sound, recording mode will be terminated and the key click will revert to normal. The key stokes recorded up to the point where the error beep occurs will be retained in the recording buffer and may be replayed or assigned to a function key in the normal manner.

In previous versions of FNKEY, if you replayed a macro while in recording mode the actual text of the macro would be stored as part of the current recording.

So for example from the top level menu (on an LZ)

mode right start recording
N enter notepad
mode space the date
exe new line
mode right stop recording
mode left Nassign to N

pressing mode N would always result in the same date being entered in the notepad !

Version 4.0 is able to store not only key strokes but also references to other macros and (almost but not quite all) FNKEY commands. Consequently in the above example FNKEY stores a reference to the macro rather than the actual macro text so that the above macro would enter the notepad and copy the correct date into the notepad.

Here is a useful date macro.

mode right start recording
mode shift exe day of the week
space a space
mode space the date
left left cursor over year
del del del del delete month (figures)
space a space
mode shift spacethe month (text)
space a space
right right cursor over year
mode right stop recording
mode left D assign to D key

mode D now replays the date in the format: Mon 10 Jun 91
and can be referenced from within other macros.

A macro which references mode exe can be used for example to paste text (after copy or cut) directly into an application.

The following key combinations give rise to internal references within a macro (when pressed during recording).

mode A-Z references and replays macro A-Z
mode exe references but does not replay the contents of the recording buffer
mode space references and replays date according to current at setting (see section 7)
mode shift space references and replays month
mode shift exe references and replays day of week
mode shift del (shift A)references and actions drive select A
mode shift del (shift B)references and actions drive select B
mode shift del (shift C)references and actions drive select C
mode up up references and actions cap lock
mode down down references and actions num lock
mode left left references and actions clear locks

See section 10 for details of drive select commands.

3.2 Replying A Recording

To replay the current recording press mode exe. Type in an amount and press mode exe to calculate the Vat on it. Try again with a few different amounts.

Note how the recording includes not only the text *1.15 but also the exe key. You can record any of the cursor and other control keys.

Recordings should be replayed in the context in which the were made. The classic example is replaying a recording with O in it such as mode L for LOG (assuming you have loaded the calc file) which can have the effect of turning your machine off (and if there are many O's in the recording it could turn off many times)! Try recording oooo from within the calculator and then replaying it from the top level menu. Devastating isn't it!

Since the next recording you make will overwrite the current one you should assign recordings you wish to use more than once to a function key as explained below.

Pressing mode exe while in recording mode issues an error beep.

You can make a macro repeat over by pressing :

mode shift del A-Z replays next macro 2 - 27 times
mode shift del spaceset repeat count back to 1

Note the repeat count is reset to 1 after replay has stopped (either by running to completion or aborted by the user).

If you have set the repeat count in error and wish to cancel use the mode shift del space sequence to reset the count.

The repeat count is always reset to 1 when you start a recording session. While in recording mode attempts to set the repeat count result in an error beep.

3.3 Saving A Recording To A Key

Press mode left (a warning beep will sound) and then a letter in the range A - Z. An error beep will sound if there is insufficient room to store the recording.

Press mode left V to assign the Vat recording to the V key and then use the utility view option to examine function key V.

Saving a recording to a function key automatically overwrites any key strokes which have been previously assigned to that key.

In contrast to earlier versions of FNKEY you cannot assign a partially complete recording to a key, you must end the recording session first.

Take care when assigning a recording which contains references to other macros not to create a circular reference.

During replay macro references are stored in a stack. One macro may call a macro which calls yet another until a depth of eight nested calls are reached at which point replay is automatically terminated. There is no limit to the number of macro called at any one level.

For example.

record" goodbye" exeassign to A key
record"hello" mode Aassign to B key
recordmode B (10 times) assign to C key

In the notepad replay C, you will get 10 times "hello goodbye"

Now try

record"hello goodbye" exe mode Aassign to A key

In the notepad replay A, you will get 2 times "hello goodbye" and then replay will stop, this is a self referencing macro and it automatically terminates when the stack becomes full.

Important, a macro which references other macros will change its effect if any of the called macros are changed.

3.4 Replaying A Saved Recording

Press mode and then the appropriate letter. For example mode V will replay the Vat recording you have just made. Note the key click comes when replay is complete.

If you replay a function key while in recording mode the characters which are replayed are added to the recording buffer. If the buffer becomes full in the process an error beep will sound, recording mode will be cancelled and replay will continue as normal.

3.5 Deleting A Saved Recording

Press mode right and then mode right again to create a null recording and then assign the result with mode left to the appropriate function key.

You can also use the utility view option to examine and delete function keys (see section 5.2).

3.6 Deleting All Recordings

To delete all recordings, select Free from the key menu, press shift del and answer yes to the prompt.


Section 4 - Cut And Paste

4.1 Introduction

Using the key combinations shift left and shift right (see also sections 7.2 and 8.2) Fnkey allows you to copy and move text while editing records, diary or notepad (LZ) entries or OPL programs.

Cut and paste is meant to be used in editing situations and you will get strange (although harmless) effects if you try to cut and paste for example in a menu.

The cut and paste keys do not require use of the mode key and take effect as soon as the left or right key is released even if the shift key is held down. This facilitates multiple cut and paste operations carried out in sequence.

Cut and paste works by adding the character displayed under the cursor to the recording buffer and then either deleting the character (move) or advancing the cursor (copy).

Cut and paste does not always work with application software written by third parties (eg. word processor packages) which sometimes react too slowly and fail to delete the character or advance the cursor before Fnkey is ready to pick up the next (resulting in duplication of characters when you attempt to paste).

You cannot cut and paste while in recording mode. If you press the move (shift left) or copy (shift right) keys an error beep will sound.

4.2 Line Mode

In line mode (the default when you first install Fnkey each copy or move operation picks up characters and adds them to the recording buffer until one of the following events occur:

  1. The end of line is encountered (spaces from the cursor position to the extreme right hand side of the display).
  2. The recording buffer becomes full (error beep).
  3. You press the on/clear key.

If you press a key (other than on/clear) while a copy or move is in effect an error beep will sound.

Now permanently assigned to shift right (copy) and shift left (cut or move).

4.3 Word Mode

In word mode (see section 7.3 for how to change modes) each copy or move operation picks up characters and adds them to the recording buffer until one of the following events occur:

  1. The cursor becomes positioned over a space (which may or may not be at the end of a line) following the end of a word. Leading spaces are treated as part of the word which follows.
  2. The recording buffer becomes full (error beep).
  3. You press then on/clear key.

Now permanently assigned to shift down (copy) and shift up (cut or move).

4.4 Moving, Copying & Pasting

Press shift left to move text. As the move proceeds the characters under the cursor disappear and text moves in from the left as if you were repeatedly pressing shift del.

Press shift right to copy text. The cursor advances to the right as characters are added to the recording butter.

To paste text press mode exe as if to replay a recording. You can also assign the results of a copy and / or move to a function key in the usual manner.

4.5 New Lines

If you start a copy or move and the cursor is on the last space in a line rather than just add a space to the recording buffer a new line character is appended and then the following line (or first word on the line) is added to the recording buffer.

The new line character is by default exe but can be changed to down or space (see section 7.3).

1. exeIdeal for OPL programs and the notepad (LZ). Not suited for editing records with save.
2. downWorks well with save but you need to create extra lines before you paste into OPL programs and the notepad (LZ).
3. space   Just picks up what is under the cursor without any special processing.

4.6 Multiple Operations

When you first start to copy or move the recording buffer is cleared.

Each copy or move appends data to the buffer until either:

  1. You paste in the text with mode exe.
  2. You assign the result of the cut operation to a function key.

This allows you to copy or move a series of words or lines as a single entity, paste them to a new location and then start a fresh cut operation.


Section 5 - Viewing Recordings - View

5.1 Viewing Recordings

Selecting View displays the following screen:

View A:7 72 ATAN()·

The current function key, the length of the recording assigned to that key and the total length of all currently assigned function keys are shown on the top line. The bottom line shows the recording with control codes (1-31) shown as ·.

From this screen the following actions are available.

  1. Press the mode key to toggle between the control code display in which control codes are shown as explained below and normal codes (32-255) are shown as =.

    View A:7 72 ······5

    Control codes 1-9 are shown as 1-9, codes 10-31 are represented by A-T.

    Note in particular the following table:

    on/clear   1       shift del 7
    mode 2 del 8
    up 3 exe C
    down 4
    left 5 shift exe D (see section 8.2)
    right 6 shift space    E (see section 8.2)

    Ascii code 255 (·) shows as · in both displays. Ascii code 254 appears as a space.

  2. Press exe to move on to the next function key definition, space to move back to the previous definition.
  3. Press a letter from A-Z to move direct to a particular function key definition.
  4. Press on/clear to return to the menu.

References to other macros within a recording are stored as a two byte code for each reference. Both bytes appear as a solid block in normal display mode.

In control mode the first byte (hex 1F. ascii 31) appears as a small square in the upper left hand corner (°) the second byte is interpreted as follows :

°A-°Z mode A-Z references macro A-Z
°0 mode exe references recording buffer
°1 mode shift del shift Areferences drive select A
°2 mode shift del shift Breferences drive select B
°3 mode shift del shift Creferences drive select C
°4 mode space references date (Dt = 0)
°5 mode space references date (Dt = 1)
°6 mode space references date (Dt = 2)
°7 mode space references date (Dt = 3)
°8 mode shift spacereferences month
°9 mode shift exe references day of week
°←mode up up references cap lock
°→mode down down references num lock
°_ mode left left references clear locks
°. ascii code 31 genuine ascii code 31
°a-°z mode shift A-Z see section 10.4

It is possible for ° to occur as the very last character in a full (254 char) recording, in such cases it is ignored during subsequent replay.

Xvue allows you to view the contents of the recording buffer.

5.2 Deleting Recordings

To delete a recording press the del key and then Y to confirm, the size of the current recording will become 0 and the size of the pool increase accordingly.

5.3 Copying recordings

In previous versions it was possible to reassign a recording from A to B say as follows.

mode right mode A mode right and then mode left B

This no longer works since only a reference to A will be stored, to make a genuine copy view the recording and press shift del, responding Y to the prompt will copy the macro to the recording buffer, it can then be assigned to another key.

It is also possible to copy recordings from one bank of keys to another by this means.

This option does not apply to Xvue.


Section 6 - Using Key Files

6.1 Introduction

The utility program provides a number of options which allow you to save sets of function keys as files. By taking advantage of this facility you can:

Function keys are always stored in groups of 26 keys as block files of type 9.

There are now 3 types of key files.

By convention, character definition file names end in a $, language definition file names end in a % and ordinary key file names end in a letter or number. You are not obliged to keep to this convention.

6.2 Loading Key Files - Load

Loads a macro, character or language definition file.

To load a set of function keys select load from the menu, type the file name and then press the exe key.

When you load a set of function keys any existing definitions will be overwritten! To preserve your existing set of function keys use the backup and restore facilities explained below.

Load determines how to process the file by examining its file length.

Days of the week files are always 21 bytes long
Months of the year files are always 35 bytes long
Character definition files are always52 bytes long
Macro definition files are always longer than 52 bytes

6.3 Saving Key Files - Save

To save the current set or function keys select save from the menu. Type the file name and then press the exe key.

If a file of the same name exists you will be asked for confirmation before the original file is overwritten.

Attempts to save a null file (no macros defined) result in an error beep (the resultant file would be 52 bytes long).

Likewise back will fail for the same reason in the same circumstances.

6.4 Backup and Restore - Back & Rest

Select back and confirm with Y to save the current set of function keys in a temporary file called A:temp.

Select rest and confirm with Y to restore the contents of A:temp.

6.5 The Key File Directory - Pack

To list the key files select pack from the menu, select a drive with the mode key and then press exe to scroll through the directory.

6.6 Deleting Key Files - Kill

To delete a key file select kill from the menu, type the file name and then press the exe key. You will be asked for confirmation before the file is erased.

6.7 character definition files - dump

Dump works in the same way as save but stores the current set of punctuation and foreign characters as defined by edit.

The following files are provided on the FNKEY datapack.

UK$default - just punctuation marks
SC$Scandinavian character set & punctuation marks
FR$French character set & punctuation marks
GK$Greek character set & punctuation marks
GR$German character set & punctuation marks
IT$Italian character set & punctuation marks
SP$Spanish character set & punctuation marks

You can examine these by loading a file and than using edit.

6.8 Language definition files - LANG

LANG is a separate program provided on the FNKEY datapack, there are two options Days and Months.

Select an appropriate option, enter a string of 3 character abbreviations (you may include spaces, you may also include foreign characters as defined by edit, however each abbreviation must be exactly 3 characters long and you must enter an abbreviation for each and every day / month), press enter and save in the normal way.

Months must be listed from January. The default setting is

JanFebMarAprMayJunJulAugSepOctNovDec

Days must be listed from Monday. The default setting is :

MonTueWedThuFriSatSun

There are 4 files provided on the FNKEY datapack :

LMON% months: JanFeb...
LDAY% days : MonTue...
UMON% months: JANFEB...
UDAY% days : MONTUE...

6.9 Viewing unused keys and buffer space - Free

Selecting Free displays the following screen:

Free 468 Size 9 3033

This display shows the amount of currently unused buffer space (the pool) and also the number of buffers allocated to and total amount of memory used by FNKEY when it was installed.

6.10 Viewing recording buffer - Xvue

The option Xvue on the utility menu shows the contents of the recording buffer in a similar manner to the View option.


Section 7 - Configuration Options

7.1 Introduction - Cnfg

Selecting cnfg displays the following menu:

Fn=1 Cp=1 Al=0 Dt=0 Ln=1 Ky=1

Each parameter takes values 0, 1 (and 2 in the case of Cp and Ln). To adjust a parameter simply press the first letter of the option, for example pressing F toggles Fn between 0 and 1, pressing C repeatedly cycles Cp through values 1, 2, 0 and back to 1.

Once you have adjusted the parameters to the values you require press on/clear to save the new settings and return to the menu.

These parameters are explained below.

The easiest configuration to work with is the default setting Fn=1 together with Cp=1, you may also wish to try Fn=4.

7.2 The Hot Key

Parameter Fn controls the action of the hot key and shift key.

The Fn parameter takes values 0 to 5, the settings are as follows :

0 or 3disables FNKEY (Ky parameter remains still in effect).
1 or 4default setting, hot key is mode, use mode mode or shift mode to effect normal mode key press.
2 or 5mode key acts as normal, hot key is shift mode.

For settings 3 to 5 the shift key acts as an independent key, to get a shifted character from the key board (both for FNKEY commands and normal key presses) press and release the shift key and then press the required key. If you have pressed shift in error, pressing it a second time will undo the effect of the first key press. The shift key does not repeat.

For example in the note pad you wish to type : 64K datapack

Normally you would hold down the shift key, press Q (6) and O (4) then release the shift key and type "K datapack".

With Fn=3 for example you would press and release shift, press Q (6), press and release shift, press O (4) and then type the remaining text as normal.

This mode is particularly useful if you have difficulty pressing shifted keys (especially shift del).

The Fn=3 setting is provided so that you can try out this mode without having to handle FNKEY commands at the same time.

7.3 Cut and Paste

The Cp parameter takes values 0 to 3 and determines the action of the shifted cursor keys.

In normal use (FNKEY disabled or not installed) these keys behave as follows:

shift up (a) cap lock
shift down (b) num lock
shift left (c) left or controls Psion printer
shift right(d) right (XP), accented chars (LZ)

shift left / right are also used by Autoscribe (Widget Software Ltd) for enhanced cursor movement.

Cp = 0keys behave exactly as described above. Prefix the key strokes with mode to cut and paste (for example use mode shift left to cut a line).
Cp = 1keys become cut and paste keys. Prefix the key strokes with mode for actions (a) - (d) above, (for example use mode shift right to move one word right within Autoscribe).
Cp = 2the shifted cursor keys return ascii codes 9,10,11 and 12. Prefix key strokes with mode to cut and paste, note actions (a) - (d) are not available in this mode which is provided primarily for use by applications linking into FNKEY directly (see section 10.4)
Cp = 3keys become cut and paste keys. Prefix the key strokes with mode to return ascii codes 9,10,11 and 12, note actions (a) - (d) are not available in this mode which is also provided primarily for use by applications linking into FNKEY directly (see section 10.4)

Please note actions (a) - (d) cannot be recorded within macros, only the normal up, down, left or right cursor movement will be stored.

The values for Ln are 0, 1 and 2.

Ln = 0 space is used for the newline character.
Ln = 1 exe is used for the new line character.
Ln = 2 down is used for the new line character.

7.4 Key Clicks

The Ky parameter controls the duration of the key click and takes values 0 to 2.

Ky = 0key click turned off except for FNKEY command sequence
Ky = 1default, normal key click.
Ky = 2doubles the length of the normal key click.

7.5 (Deleted)

7.6 Special Characters - Edit

Selecting edit displays the following screen:

Edit A: 91 &5B [[[[[[[[[[[[[[[[

This display shows the current mode down letter to edit together with its ascii code in decimal and in hex with the actual character echoed on the bottom line.

  1. Press exe to move forwards through the alphabet. space to move backwards.
  2. Press a letter from A - Z to show the setting for that letter.
  3. Use up or left to increase the ascii code for the current letter.
  4. Use down or right to decrease the ascii code for the current letter.
  5. Press mode to return the code for the current letter to its default value.
  6. Press on/clear to save the settings and return to the menu. Take care not to alter any settings inadvertently.
Note:ascii codes 1-31 (control codes), ascii code 254 (and on the XP ascii codes 128-159) echo as spaces. See also sections 8.1 and 8.2 below.

There are now 52 user selectable characters, pressing mode switches between the two sets of characters (in previous versions mode restored the default value for a key - this feature is no longer available).

You may assign the ascii code 0 to a key - this makes the key undefined (nothing happens when you press mode down followed by the key in question).

To make edit easier to use, up and down change the ascii code by 1, left and right adjust the code by a value or 16. Thus referring to the appendix of ascii codes in the organiser manual up and down move vertically and left and right horizontally through the table.

Edits may be saved with Dump (see section 6.7).

7.7 Date options

The Dt parameter take values 0 to 3 and determines the action date key (mode space).

Dt = 0dd.mm.yy
Dt = 1dd.mm.yy hh:mm
Dt = 2yy-mm-dd
Dt = 3yy-mm-dd hh:mm

Formats 2 and 3 can be easily sorted into date order.

Note that macros which reference the date key remember the format used when the macro was created, you can therefore set up macros which use different date formats at the same time.

7.8 Accessing Load in a macro

Previous versions of FNKEY did not allow access to the utility program while FNKEY was in replay or record mode. It now permits access to the Load option so that you may make a recording to swap FNKEY files.

Al = 0Access to the utility program denied (default).
Al = 1Access to Load permitted, prompt for backup.
Al = 2Access to Load permitted, no prompt for backup.

If Al is set to 0 an alarm will sound if you try to access the utility program while recording or replay are active.

With Al set to 1 or 2 you can access the load option while in recording mode or during replay (but not both at the same time).

To make a recording which will load an FNKEY file :

Start recording, from the top level menu select Key, instead of the utility menu appearing you will be prompted for the name of the file you wish to load, type in the file name and press exe, you will be returned to the top level menu, complete the recording.

Note :While you are in the load option the hot key and cut and paste keys are disabled, consequently pressing mode will scroll through the drives on your system. When you press exe, the utility program will test that the file name is valid. however it does not check that the file you have specified exists, nor does it attempt to load the file.

The action taken when you replay the recording depends on how the Al parameter has been set.

If Al is set to 1 then as soon as replay causes the utility program to be accessed you will be asked whether you wish to backup the current set of key definitions, you must respond to this prompt from the keyboard. Once you have responded to the prompt the FNKEY file will be loaded, the organiser will he returned to the top level menu replay will continue as normal.

If Al is set to 2 then the backup prompt is bypassed and any casual function key assignments will be lost when the new FNKEY file is loaded.

There are rare circumstances in which the current recording (that replayed by pressing mode exe) may be erased as part of the process of loading the new FNKEY file, if this is about to happen you will be warned with an Overwrite prompt, again you must respond to this prompt from the keyboard.

A sensible way to organise say a group of 4 FNKEY files so that each can load another is to proceed as follows :

  1. Assuming the FNKEY files are to be named MAIN, APP1, APP2 and APP3, where the MAIN file contains basic recordings for day to day use and APP1-3 contain application specific recordings.
  2. Make recordings to load APP1, APP2, and APP3 and assign them to keys X, Y and Z say to be saved as part of MAIN. You can then access any at your application files from MAIN.
  3. Make a recording to load MAIN and assign it to W say, save the recording as part of APP1, APP2 and APP3. You can then return quickly to the MAIN file from any of your application files.
  4. Note that a recording which leads an FNKEY file can contain key strokes to leave one application, load the FNKEY file appropriate for a new application and then enter the new application.

Section 8 - Compatibility And Error Messages

8.1 The XP and CM

Ascii codes in the range 128-159 (80-9F) display as spaces on the CM and XP. In particular code 156 (9C) which represents a genuine printable pound sign displays as a space.

The pseudo pound generated by mode down space is ascii code 237 (ED) and is for display purposes only, it will not print as a pound sign. You can however use the Comms Link setup parameters rtrn (for receiving data) and ttrn (for transmitting or printing data) to convert this code to 156. On some printers the hash sign # ascii code 35 (23) will print as a pound sign.

8.2 The LZ and LZ64

Ascii codes in the range 128 - 159 (80 - 9F) display as spaces on an LZ when running software in XP emulation (two line) mode. In particular code 156 (9C) which represents a genuine printable pound sign displays as a space.

In addition to the normal control codes the following have meaning in certain circumstances an the LZ.

ascii code 14 (0E)generated by pressing shift exe while viewing data with find (to scroll backwards).
ascii code 15 (0F)generated by pressing shift space while editing data using save (to split lines).

Ascii code 15 is a useful code since it also works to split lines when editing records from within Xbase and can be used as an alternative to the break character although it can never generate more than 16 lines in a record.

While cut and paste are enabled (Cp = 1 or 2) you cannot obtain access to foreign characters using the LZ shift right key sequence. You can of course still use the Fnkey mode down A-Z key sequence to obtain any punctuation, foreign or special characters which have been defined using the edit option.

8.3 Older Versions

In order to attain a high level of compatibility with the LZ it has been necessary to introduce a deliberate delay during the replaying of key strokes and while cutting and pasting text. Fnkey runs about twice as slowly as version 2.2 in debug mode, roughly 32 times slower than Fnkey 2.2 in default mode or versions 2.0 and 2.1.

Fnkey files saved with earlier versions of Fnkey are fully compatible with the key files generated by save and back with the proviso that soft and hard pauses will be interpreted as ascii codes 128 and 129.

Ascii code 31 occurring within macros loaded from FNKEY files created with earlier version of FNKEY will be misinterpreted by version 4.0 (you are very unlikely to have such macros).

The NULL file supplied with version 3 onwards will he taken as a character definition file by version 4.0 and will erase all character edits rather than all macros.

8.4 Error Messages

The following error messages may be generated during the installation and / or removal process:

  1. wrong version

    Generated if you try to remove or fix a version of Fnkey using a chip with a different version number to the version already installed. For certain versions of Fnkey the alien software message may be generated instead.

  2. devices present

    Generated if you try to install or remove Fnkey while devices drivers are installed.

  3. alien software

    Generated if you try to remove Fnkey while other memory resident software is present in the same memory partition at a higher address or has taken control of the keyboard interrupt vector.

  4. invalid call

    Generated if you try to run the key installation program from the calculator, the prog menu or from within an OPL program.

  5. cell invalid

    You should never get this error. If it does occur save all files, programs, the diary etc. to a datapack or RAM pack and reset your Organiser.


Section 9 - Quick Reference Chart

Command Sequences

mode mode (or shift mode)    Actions mode
mode up A - Z Case inversion
mode up space Break character
mode down A - Z Special characters
mode down space Pound sign
mode left A - Z Assign to function key
mode right Toggle record mode
mode space Date key
mode A - Z Replay function key
mode up up cap lock
mode down down num lock
mode left left clear locks
mode shift up cap lock
mode shift down num lock
mode down shift A-Z additional special characters
mode shift space month
mode shift exe day
mode shift del A-Z set repeat count
mode shift del spaceclear repeat count
mode shift del shift A-C set drive / datapack slot

Illegal In Record Mode

mode exe Replay / Paste
shift left Move
shift right    Copy

Cancellation Sequences

mode on/clear
mode up on/clear
mode down on/clear
mode left on/clear
mode del
mode up del
mode down del
mode left del

Section 10 - Miscellaneous

10.1 Drive selection

One of the difficulties with defining and using macros with FNKEY relates to the selection of datapacks, the standard approach is ok when used interactively but falls down within macros because the mode key advances the datapack in sequence and its effect is dependent on both current setting and which datapacks slots are occupied.

FNKEY 4.0 provides three key sequences (which can be referenced within macros) which set the current choice of datapack slot in an absolute manner.

occupied slots None  B    C    B & C
mode shift del shift A   A: A:A:A:
mode shift del shift BA: B:C:B:
mode shift del shift CA: A:C:C:

The rule is as follows: if the required slot is occupied it is selected, otherwise it there is a pack in the next slot (a pack in C but not in B and you are trying to select B) that pack will be selected) failing which pack A will be selected.

You should set the pack before entering an application otherwise it may not take effect immediately.

10.2 Bank switching

The load facility can be used to load character, language or macro definition files. When macro definition files are loaded the following restrictions apply :

  1. Any repeat count which has been set will be reset to one.
  2. The replay stack is cleared.

10.3 Cap and num locks

There are two methods for changing the cap and num lock.

  1. mode up up / mode down down.
  2. mode shift up / mode shift down (depends on Cp setting).

There is a slight difference in effect however. Only the first method if used while recording takes effect both when the recording is made and when it is replayed.

In the same way that setting a drive from within a macro can give rise to problems (section 10.1), likewise the effect of mode up up / mode down down will depend on the previous state of the locks.

The command sequence mode left left may be used to clear both locks and hence create an absolute point of reference, if used during recording it will take effect during replay.

Because mode left is also used to begin an assign sequence there will be a beep when you press left the first time, this is quite ok and is normal.

Clearing both locks means changing to UPPER case with shift producing the numerics.

If you set the state of the keyboard from within a macro you should do so after entering the application where you wish it to be effective (since some applications set the key board status when you first run them).

10.4 Application interface

Details of the application interface can be obtained from Cubsoft.

  1. Special quick access keys can be defined by an application which the user can access by pressing mode shift A-Z

    The assignment of normal macros to A-Z and the quick keys to a-z can be reversed for the duration of the application.

    The quick keys can be embedded in macros and appear in view as °a-°z

  2. Applications can temporarily set the Cp parameter to 3 or 4 in order to detect the action of the shifted cursor keys.