The optional additions to the unicode courtyard of the Astrolabe Channel numerical pointer.

William Overington

Copyright 2002 William Overington

Tuesday 12 February 2002

In a previous document concerning the Astrolabe Channel numerical pointer Some notes about the Astrolabe Channel numerical pointer. there is stated, concerning the unicode courtyard, the following.

In the event of a keying error being made, VK_UP followed by VK_DOWN will reinitialize the unicode courtyard.

Now that it is desired to add further optional features to the unicode courtyard, in order to provide support for using the 'uhhhh and 'Uhhhhhh formats suggested in the document An infrastructure to enable end users to enter 21 bit unicode characters for use on the DVB-MHP platform. this former statement could potentially lead to problems. However, a solution has been found, which, in fact, also leads to greater flexibility.

The total situation which I determined needed to be solved was as follows.

When an end user is within the unicode courtyard, he or she may wish to do one of several different things.

1. Produce one 16 bit unicode character.

2. Produce a string of 16 bit unicode characters.

3. Produce easily a string of 16 bit unicode characters which can contain any of the 19 characters 0 1 2 3 4 5 6 7 8 9 a b c d e f ' u U

A restriction such that the ' u and U characters can only be added using the two character sequences 'u and 'U would not be a problem.

4. Produce easily one character which is any one of the 20 characters 0 1 2 3 4 5 6 7 8 9 a b c d e f ' u U enter

5. Reinitialize the unicode courtyard.

6. Go back so as just to delete the effects of the previous button push without reinitializing the unicode courtyard.

7. When producing a string of 16 bit unicode characters, to be able to mix freely characters constructed from individual hexadecimal items with characters produced in 'uhhhh and 'Uhhhhhh formats.

In this document the colours red, green, yellow, blue are used to express the buttons VK_COLORED_KEY_0 VK_COLORED_KEY_1 VK_COLORED_KEY_2 VK_COLORED_KEY_3 respectively. This is for convenience of explanation and for compactness of the explanation tables. These particular colours need not necessarily be used.

The unicode courtyard was previously imagined as an area where one may generate a single unicode character using hexadecimal items. The buttons 0 1 2 3 4 5 6 7 8 9 red green yellow blue left right being used to input the hexadecimal items 0 1 2 3 4 5 6 7 8 9 a b c d e f respectively.

The current optional extension to the unicode courtyard may be imagined as follows. Beyond the original character generation area, now called the first area, there is now a second area. At the right, across both the first area and the second area, is a raised patio. Thus, at any one time, the end user is in one of three places, namely the first area, the second area, or the patio.

The push button keys have different meanings dependent upon which of the three areas the end user is in at the time that the button is pushed. Upon entering the unicode courtyard, the user is in the first area. There is a null character in the character buffer. There is a null string in the string buffer.

The unicode courtyard may be left using the VK_ENTER button, in which case an event is produced. This is either a direct character event or an indirect character event or a string event: a string event is necessarily indirect.

A direct character event is represented by the character.

An indirect character event is represented by a character event character the same for whichever character is produced, together with the specific character as a data item.

A string event is represented by a string event character the same for whichever character is produced, together with the specific string as a data item.

The unicode courtyard fitted with the optional extension works in the following manner.

In the first area, sixteen buttons are used to enter hexadecimal items to one character.

In the second area, sixteen buttons are used to append one whole hexadecimal character to a string.

In both the first area and the second area the up button causes movement onto the patio.

In the second area the down button always appends 'u to the string buffer. In the first area, the effect of pushing the down button, provided that the character buffer contains a null character, is to append 'u to the string buffer and to move to the second area. However, if the character buffer does not contain the null character, there is an entirely different effect, which is to append the character which is in the character buffer to the string buffer, clear the character buffer, set the event type to string event and stay in the first area.

It is helpful to think of up and down being really to produce 'U and 'u appended to the string buffer. However, only down acts directly, namely to append 'u to the string.

The up button also has to deal with various other possibilities. However, as 'U0 and 'U1 are the only permitted sequences of characters to add to the string to produce a validly coded string for the present unicode courtyard purpose, it is satisfactory to use up 0 to give 'U0 and up 1 to give 'U1 and to use up followed by certain other characters for special effects without making entry of 'U0 and 'U1 take any longer.

On the patio, a 0 character causes movement to the string generation area and the three characters ' and U and 0 are appended to the string, a 1 character causes movement to the string generation area and the three characters ' and U and 1 are appended to the string.

The character event may be direct or indirect. This can be explicitly set on the patio. It is up to individual implementers as to whether the default at entry to the unicode courtyard is direct or indirect. If in any doubt about this, make the default to be for a direct event unless there is some good reason otherwise. Yet this matter is left to implementers to provide maximum flexibility. For example, I found that when using the Astrolabe Channel numerical pointer in a landscape for 1456 object code, that an indirect event was needed.

An aspect of the use of 21 bit unicode is that the first area of the Astrolabe Channel numerical pointer may be used to produce a character event where the character is a 21 bit unicode character. When the VK_ENTER button is used to produce a character event, the Astrolabe Channel numerical pointer software needs to check whether the character which has been input by the end user, the value of which can be held in a Java int variable while being formed, is beyond the 16 bit unicode range. If it is beyond the 16 bit unicode range yet within the valid 21 bit unicode range, it may be split into two surrogate codes. If a character direct event is being used, the first code of the surrogate pair can be used as the character and the second code of the surrogate pair stored into a global char variable acnp_c2. If a character indirect event is being used, the first code and the second code of the surrogate pair can be stored into global char variables acnp_c1 and acnp_c2 respectively.

A table of the codes is provided below. Please note that when on the level 1 patio, all valid button pushes move the user off the level 1 patio.

Please note in particular that the event type produced starts off as one of the two character events. A string event can be designated either explicitly using the sequence VK_UP VK_4 which also moves the end user to the second area, or a string event will automatically be presumed by the use of any of the following sequences of one or two button pushes, VK_DOWN, VK_UP VK_0, VK_UP VK_1, VK_UP VK_5, VK_UP VK_6 or a string event will be automatically set by the string buffer containing two or more characters.

Readers are asked to note that although the second area has been added to the unicode courtyard in order to enable strings to be produced from within the unicode courtyard, use of the second area does not imply as such that the intention is to produce a string event rather than a character event. The system retains the initial presumption that a character event is intended until either explicitly told otherwise or until user activity causes that initial presumption to become either impossible or unlikely.

Please note that a one character string event can be produced and that a null string can be produced. A single character string event can be produced by either constructing the character in the first area then using VK_DOWN VK_ENTER or by producing the character in the second area and then using VK_UP VK_4 VK_ENTER or by producing the character on the patio and then using VK_UP VK_4 VK_ENTER. A null string, which is a string with no characters in it, can be produced using VK_UP VK_4 VK_ENTER.

Suppose that one wishes, out of an interest in understanding the system by looking at the difference between a null string and a string which contains a null character, to produce a string which is one character long where that one character is a null character U+0000. A null character, U+0000 can be produced using VK_UP VK_9 and is automatically added to the string buffer, however, a character event will be presumed. The string event choice could be set explicitly using VK_UP VK_4 and then VK_ENTER used, a total of five button pushes. However, as the character buffer contains a null character when the user enters the unicode courtyard, the desired result can be obtained by using, at entry to the unicode courtyard, VK_UP VK_5 VK_ENTER or VK_UP VK_6 VK_ENTER as desired.

Area Button pushed Meaning
     
First area 0 character buffer value multiplied by 16 and 0 added
First area 1 character buffer value multiplied by 16 and 1 added
First area 2 character buffer value multiplied by 16 and 2 added
First area 3 character buffer value multiplied by 16 and 3 added
First area 4 character buffer value multiplied by 16 and 4 added
First area 5 character buffer value multiplied by 16 and 5 added
First area 6 character buffer value multiplied by 16 and 6 added
First area 7 character buffer value multiplied by 16 and 7 added
First area 8 character buffer value multiplied by 16 and 8 added
First area 9 character buffer value multiplied by 16 and 9 added
First area red character buffer value multiplied by 16 and 10 added
First area green character buffer value multiplied by 16 and 11 added
First area yellow character buffer value multiplied by 16 and 12 added
First area blue character buffer value multiplied by 16 and 13 added
First area left character buffer value multiplied by 16 and 14 added
First area right character buffer value multiplied by 16 and 15 added
First area up move onto the patio, level 1
First area down if a null character is in the character buffer, move to the second area, a character ' and a character u are appended to the string buffer and the event type is set to string type; otherwise append the character which is in the character buffer to the string buffer, setting the character buffer to null, remain in the first area and the event type is set to string type
First area enter generate an event, being either a character direct event or a character indirect event or a string event depending upon the setting of the event type
First area teletext go back to the main area of the Astrolabe Channel numerical pointer
     
Second area 0 a character 0 is loaded into the character buffer and also appended to the string buffer
Second area 1 a character 1 is loaded into the character buffer and also appended to the string buffer
Second area 2 a character 2 is loaded into the character buffer and also appended to the string buffer
Second area 3 a character 3 is loaded into the character buffer and also appended to the string buffer
Second area 4 a character 4 is loaded into the character buffer and also appended to the string buffer
Second area 5 a character 5 is loaded into the character buffer and also appended to the string buffer
Second area 6 a character 6 is loaded into the character buffer and also appended to the string buffer
Second area 7 a character 7 is loaded into the character buffer and also appended to the string buffer
Second area 8 a character 8 is loaded into the character buffer and also appended to the string buffer
Second area 9 a character 9 is loaded into the character buffer and also appended to the string buffer
Second area red a character a is loaded into the character buffer and also appended to the string buffer
Second area green a character b is loaded into the character buffer and also appended to the string buffer
Second area yellow a character c is loaded into the character buffer and also appended to the string buffer
Second area blue a character d is loaded into the character buffer and also appended to the string buffer
Second area left a character e is loaded into the character buffer and also appended to the string buffer
Second area right a character f is loaded into the character buffer and also appended to the string buffer
Second area up move onto the patio, level 1
Second area down a character ' and a character u are appended to the string buffer and the event type is set to string type
Second area enter generate an event, being either a character direct event or a character indirect event or a string event depending upon the setting of the event type
Second area teletext go back to the main area of the Astrolabe Channel numerical pointer
     
patio, level 1 0 move to the second area, append 'U0 to the string buffer, set event type as string type if not already so
patio, level 1 1 move to the second area, append 'U1 to the string buffer, set event type as string type if not already so
patio, level 1 2 set the event type to character direct event, designated d, move to the first area
patio, level 1 3 set the event type to character indirect event, designated i, move to the first area
patio, level 1 4 set the event type to string event, designated s, move to the second area
patio, level 1 5 append the current character to the string buffer, reset the character buffer to U+0000, move to the first area, set the event type to string type
patio, level 1 6 append the current character to the string buffer, reset the character buffer to U+0000, move to the second area, set the event type to string type
patio, level 1 7 move to the first area, setting the character buffer to contain a null character
patio, level 1 8 move to the second area, setting the character buffer to contain a null character
patio, level 1 9 a null character U+0000 is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 red a character U is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 green a character u is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 yellow a character - is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 blue a character . is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 left a character ' is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 right an enter character is loaded into the character buffer and also appended to the string buffer, move to the first area
patio, level 1 up move to the patio, level 2 (this is reserved so as to allow for a possibility of future expansion)
patio, level 1 down reinitialize the unicode courtyard, move to the first area
patio, level 1 enter
patio, level 1 teletext delete the effect of the button push which was the last button push input before the up button and the teletext button were pushed, move to the area where that button push took place

 

Astrolabe Channel

Copyright 2002 William Overington

This file is accessible as follows.

http://www.users.globalnet.co.uk/~ngo/ast02901.htm