Sequences of push button pushes to input information to Java Calculator Programs on the DVB-MHP platform using the minimum set of input events, part 2 of 3, with character codes.

William Overington

Copyright 2002 William Overington


Supplementary note of Saturday 19 October 2002

This document has now been adapted so as to include Unicode Private Use Area codes for full and partial sequences.

Apart from this supplementary note, the addition to the title, the change of file name and for the addition of the U+ entries in the notes column of the table, the contents of this document are the same as those of the ast02101.htm document of Saturday 2 February 2002.

The coding of the Private Use Area codes uses the following basis as far as possible. These coding codes are simply for convenience within this encoding. As it happens, for most of the codes this encoding basis give a good indication of the coding that is used and a coding gives a good indication of its meaning: however, that is not absolute in either encoding or deciphering as some codes, notably longer codes and the codes for the Unicode courtyard facility of a calculator, have needed fitting in to the encoding space in ways which do not fit the general encoding basis.

zero, and sometimes, enter 0
teletext 1
red 2 and A
green 3 and B
yellow 4 and C
blue 5 and D
up 6
down 7
left 8
right 9
partial F
escape or end or just some extra meaning E

The twenty buttons are regarded as producing the following character codes.

Incoming event Unicode Private Use Area code suggested by the present author.
VK_0 U+E800
VK_1 U+E801
VK_2 U+E802
VK_3 U+E803
VK_4 U+E804
VK_5 U+E805
VK_6 U+E806
VK_7 U+E807
VK_8 U+E808
VK_9 U+E809
VK_UP U+E80A
VK_DOWN U+E80B
VK_LEFT U+E80C
VK_RIGHT U+E80D
VK_ENTER U+E80E
VK_TELETEXT U+E80F
VK_COLORED_KEY_0 U+E810
VK_COLORED_KEY_1 U+E811
VK_COLORED_KEY_2 U+E812
VK_COLORED_KEY_3 U+E813

The above codes could be used for any desired purpose, not just for Java calculators.

Readers may like to know of my thinking as to how the Unicode Private Use Area characters for button push sequences could be used.

Suppose that the twenty minimum set button pushes on a hand held infra-red control device are interfaced in the Java program so that the program receives button pushes as the above twenty Unicode Private Use Area codes, this being regardless of whether a Java calculator or some other software construct is being used. These twenty character codes are then used to index a conversion array, where the output produced is also a character code from the Unicode Private Use Area. That character code is then processed by the Java program.

The advantage of this approach is that when a Java calculator using my suggested button push encoding is started up, the characters stored in the conversion array are twenty characters from the set encoded in this document.

Those twenty characters are the effects of pushing a button while on the base plane of the calculator encoding system.

Some of the character codes output from the conversion array, such as the character code corresponding to any of the digits U+E100 to U+E109 and the yellow button U+E114 and the blue button U+E115, will be programmed to perform a specific action within the calculator. Suppose however that VK_COLORED_KEY_1 is pushed (that is, the green button usually), then a character code U+E3FF will be generated which will be programmed to change the contents of the conversion array so that the incoming button pushes are converted to become the codes produced by pushing a button while upon the green disc of the calculator. So, now pushing, say, the 2 button, will generate U+E802 and that will be converted to a character code U+E3F2 that indicates that the "green 2" calculator function is to be carried out and the contents of the conversion array is to be reset to be the codes for the base plane of the Java calculator. The green 2 code is for the cosine function.

Thus, by having individual character codes for 2 U+E102, green .... U+E3FF, green 2 U+E3F2 and so on, programming of a Java calculator is simplified.

By having a published set of such codes, the possibility of increasing the portability of software for calculators running on the DVB-MHP platform is increased.

These particular encodings are essentially internal to Java programs, yet by being in the form of Unicode Private Use Area character codes they can also be stored in text files. Thus there are possibilities for storing macros and programmable calculator programs in text file format if so desired.

Button push complete sequence to leave the calculator. Notes
enter U+E110
teletext U+E111

Button push complete sequence, for use in conjunction with a calculator, if so desired. Arrows may be implemented as either independent of a calculator or as part of a calculator as desired by the programmer of a particular calculator. Notes
up U+E116
down U+E117
left U+E118
right U+E119

Here are the codes for partial sequences within the Java calculator universe. Please note that some partial sequences are included for which complete codes are not yet published.

Button push partially complete sequence. Notes
red .... U+E2FF
red 0 .... U+E20F
red up .... U+E26F
red down .... U+E27F
red teletext .... U+E21F
red green .... U+E23F
red yellow .... U+E24F
red blue .... U+E25F
green .... U+E3FF
green 0 .... U+E30F
green up .... U+E36F
green down .... U+E37F
green left .... U+E38F
green right .... U+E39F
green red .... U+E32F
green yellow .... U+E34F
green blue .... U+E35F
green left red .... U+E3AF
green left green .... U+E3BF
green left yellow .... U+E3CF
green left blue .... U+E3DF
red down red .... U+E2AF
red down green .... U+E2BF
red down yellow .... U+E2CF
red down blue .... U+E2DF
red down right .... U+E2EF
red down right 0 .... U+E1EF
red up red .... U+E12F
red up green .... U+E13F
red up yellow .... U+E14F
red up blue .... U+E15F

A table of codes for use within the Unicode Courtyard of the Java Calculator.

green right 0 0 within courtyard U+E190
green right 1 1 within courtyard U+E191
green right 2 2 within courtyard U+E192
green right 3 3 within courtyard U+E193
green right 4 4 within courtyard U+E194
green right 5 5 within courtyard U+E195
green right 6 6 within courtyard U+E196
green right 7 7 within courtyard U+E197
green right 8 8 within courtyard U+E198
green right 9 9 within courtyard U+E199
green right red A within courtyard U+E19A
green right green B within courtyard U+E19B
green right yellow C within courtyard U+E19C
green right blue D within courtyard U+E19D
green right up UP within courtyard U+E396
green right down DOWN within courtyard U+E397
green right left E within courtyard U+E19E
green right right F within courtyard U+E19F
green right enter Exit from the courtyard and go back to the base plane of the calculator, transferring the information produced while within the courtyard. U+E390
green right teletext T within courtyard U+E391

End of supplementary note of Saturday 19 October 2002


The original text of Saturday 2 February 2002 with U+ code points added.

Here is a full list of the basic sequences thus far defined.

Button push sequence Meaning Notes
0 0 U+E100
1 1 U+E101
2 2 U+E102
3 3 U+E103
4 4 U+E104
5 5 U+E105
6 6 U+E106
7 7 U+E107
8 8 U+E108
9 9 U+E109
yellow negative data U+E114
blue decimal point U+E115
red 1 + U+E2F1
red 2 - U+E2F2
red 3 * U+E2F3
red 4 / U+E2F4
red 5 = U+E2F5
red 6 , U+E2F6
Please see note below
red 7 ; U+E2F7
Please see note below
red 8 : U+E2F8
Please see note below
red 9 clear a,b,c,d U+E2F9
red 0 1 a=b U+E201
red 0 2 b=a U+E202
red 0 3 swap a and b U+E203
red 0 4 a=c U+E204
red 0 5 c=a U+E205
red 0 6 b=c U+E206
red 0 7 c=b U+E207
red 0 8 swap a and c U+E208
red 0 9 swap b and c U+E209
red up 0 in a macro, return from a call U+E260
red up 1 in a macro, jump to label 1 U+E261
red up 2 in a macro, jump to label 2 U+E262
red up 3 in a macro, jump to label 3 U+E263
red up 4 in a macro, jump to label 4 U+E264
red up 5 in a macro, jump to label 5 U+E265
red up 6 in a macro, call to label 6 U+E266
red up 7 in a macro, call to label 7 U+E267
red up 8 in a macro, call to label 8 U+E268
red up 9 in a macro, call to label 9 U+E269
red down .... (next one not a digit) General escape mechanism so as to allow longer sequences to be defined.
red down 0 in a macro, return from a call, if linkflag is true U+E270
red down 1 in a macro, jump to label 1, if linkflag is true U+E271
red down 2 in a macro, jump to label 2, if linkflag is true U+E272
red down 3 in a macro, jump to label 3, if linkflag is true U+E273
red down 4 in a macro, jump to label 4, if linkflag is true U+E274
red down 5 in a macro, jump to label 5, if linkflag is true U+E275
red down 6 in a macro, call to label 6, if linkflag is true U+E276
red down 7 in a macro, call to label 7, if linkflag is true U+E277
red down 8 in a macro, call to label 8, if linkflag is true U+E278
red down 9 in a macro, call to label 9, if linkflag is true U+E279
red left get from memory
As sequences are simply a method of inputting commands using the minimum set of input events, implementation is up to the Java programmer.
However, for programmers who would prefer a specific recommendation, a=m[d] is suggested.
U+E28E
red right store to memory
As sequences are simply a method of inputting commands using the minimum set of input events, implementation is up to the Java programmer.
However, for programmers who would prefer a specific recommendation, m[d]=a is suggested.
U+E29E
red teletext 0 U+E210
red teletext 1 define label 1 within a macro U+E211
red teletext 2 define label 2 within a macro U+E212
red teletext 3 define label 3 within a macro U+E213
red teletext 4 define label 4 within a macro U+E214
red teletext 5 define label 5 within a macro U+E215
red teletext 6 define label 6 within a macro U+E216
red teletext 7 define label 7 within a macro U+E217
red teletext 8 define label 8 within a macro U+E218
red teletext 9 define label 9 within a macro U+E219
red green 0 clear a U+E230
red green 1 a=d U+E231
red green 2 d=a U+E232
red green 3 b=d U+E233
red green 4 d=b U+E234
red green 5 c=d U+E235
red green 6 d=c U+E236
red green 7 clear b U+E237
red green 8 clear c U+E238
red green 9 clear d U+E239
red yellow 0 U+E240
red yellow 1 a register gets the focus U+E241
red yellow 2 b register gets the focus U+E242
red yellow 3 c register gets the focus U+E243
red yellow 4 d register gets the focus U+E245
red yellow 5 U+E245
red yellow 6 U+E246
red yellow 7 U+E247
red yellow 8 Text box gets the focus U+E248
red yellow 9 Text area gets the focus U+E249
red blue 0 end macro definition U+E250
red blue 1 define macro 1 U+E251
red blue 2 define macro 2 U+E252
red blue 3 define macro 3 U+E253
red blue 4 define macro 4 U+E254
red blue 5 define macro 5 U+E255
red blue 6 U+E256
red blue 7 U+E257
red blue 8 U+E258
red blue 9 U+E259
green 1 sine U+E3F1
green 2 cosine U+E3F2
green 3 tangent U+E3F3
green 4 pi U+E3F4
green 5 exponential U+E3F5
green 6 natural logarithm U+E3F6
green 7 sinh U+E3F7
green 8 cosh U+E3F8
green 9 tanh U+E3F9
green 0 1 arcsine U+E301
green 0 2 arccosine U+E302
green 0 3 arctangent U+E303
green 0 4 arctangent2 U+E304
green 0 5 10 to the power of U+E305
green 0 6 base 10 logarithm U+E306
green 0 7 squared U+E307
green 0 8 square root U+E308
green 0 9 random number U+E309
green up 0 eutodraw $Z U+E360
green up 1 eutodraw $P U+E361
green up 2 eutodraw $X U+E362
green up 3 eutodraw $Y U+E363
green up 4 eutodraw $C U+E364
green up 5 eutodraw $M U+E365
green up 6 eutodraw $N U+E366
green up 7 eutodraw $F U+E367
green up 8 eutodraw $E U+E368
green up 9 eutodraw $Q U+E369
green up red eutodraw $r U+E36A
green up green eutodraw $g U+E36B
green up yellow eutodraw $c U+E36C
green up blue eutodraw $b U+E36D
green down .... (next one not a digit) General escape mechanism so as to allow longer sequences to be defined.
green down 0 U+E370
green down 1 in a macro, if a=b set linkflag true, else false U+E371
green down 2 in a macro, if a!=b set linkflag true, else false U+E372
green down 3 in a macro, if a>b set linkflag true, else false U+E373
green down 4 in a macro, if a>=b set linkflag true, else false U+E374
green down 5 in a macro, if a<b set linkflag true, else false U+E375
green down 6 in a macro, if a<=b set linkflag true, else false U+E376
green down 7 in a macro, if a and b may be compared, set linkflag true, else false U+E377
green down 8 in a macro, if a and b may not be compared, set linkflag true, else false U+E378
green down 9 U+E379
green left .... (next one not a digit) Function escape mechanism so as to allow longer sequences to be defined for yet even more mathematical functions.
green left 0 U+E380
green left 1 Bessel function of the first kind U+E381
green left 2 Bessel function of the second kind U+E382
green left 3 Chebyshev polynomial U+E383
green left 4 U+E384
green left 5 U+E385
green left 6 absolute U+E386
green left 7 floor U+E387
green left 8 rounded U+E388
green left 9 ceiling U+E389
green right ... Entry of a unicode character
green red 0 The E code used for entering very large and very small numbers. U+E320
green red 1 convert a from degrees to produce radians U+E321
green red 2 convert a from radians to produce degrees U+E322
green red 3 convert a from x + iy form to produce r, theta form U+E323
green red 4 convert a from r, theta form to produce x + iy form U+E324
green red 5 U+E325
green red 6 U+E326
green red 7 private use area U+E327
green red 8 private use area U+E328
green red 9 private use area U+E329
green yellow 0 Clear the graphics screen. U+E340
green yellow 1 Move the pen without drawing on the graphics screen using the contents of the a and b registers as data. U+E341
green yellow 2 Draw a line on the graphics screen using the contents of the a and b registers as data. U+E342
green yellow 3 Choose the pen colour using the contents of the a register to give the colour number. The colours are up to the individual programmer, though the colour set in the document ast01300.htm is available for use and if programmers used that set it would assist standardization and also have the advantage of those colours that can do so having the same numerical codes as the well know resistor colour code of electronics. That is, colours are from 0 to 13 for standardized colours and then there are colours 14 and 15 as well if people choose to add them in. The link above is a local link due to problems of fitting a full link into this table. A full link is available after the end of the table. U+E343
green yellow 4 Draw a cencharacter located by the present pen position, the shape of the particular cencharacter being determined by the contents of the a register. U+E344
green yellow 5 Draw the string from the text box starting at the present pen position. U+E345
green yellow 6 Set the text size that is to be used, based upon a number that is contained in the a register. If this command is not used, a default text size is to be provided so that use of green yellow 5 will work properly. U+E346
green yellow 7 U+E347
green yellow 8 U+E348
green yellow 9 U+E349
green blue 0 U+E350
green blue 1 run macro 1 U+E351
green blue 2 run macro 2 U+E352
green blue 3 run macro 3 U+E353
green blue 4 run macro 4 U+E354
green blue 5 run macro 5 U+E355
green blue 6 U+E356
green blue 7 U+E357
green blue 8 U+E358
green blue 9 U+E359

In the description of the "green yellow graphics" system above, the word cencharacter is used. The word cencharacter is a word that I have used for many years. It was the name of a proceduce call in the hardcopy plotter graphics package for the Elliott 803 mainframe computer upon which I first used computer graphics. A cencharacter is one of those small graphics drawn around a point on a scientific graph so that its position can be clearly noticed. There is a circle, a square, a triangle and so on. I remember that cencharacter(4) was a butterfly style design made up of four straight lines, two of which passed through the data point itself, whereas the circle, square and triangle did not actually connect with the data point itself.

In relation to the colour codes mentioned in the "green yellow graphics" system above, where a full link could not be fitted into the table, here is the full link.

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

Here is the note about the use of the commands red 6, red 7 and red 8.

An interesting aspect of the sequences is that the contents of the registers that are entered with these sequences may be any of a number of different mathematical forms provided that the Java calculator program accepts them. For example, a simple calculator would only accept ordinary numbers. However, the sequences provide facilities for entering complex numbers, quaternions, vectors and matrices, including matrices of complex numbers.

The various numerical types are achieved using just three sequences. These are as follows.

red 6 field separator

red 7 column separator

red 8 row separator

In order to enter a complex number such as 1.2 -3.4i into a Java calculator that will accept complex numbers, one would use the following.

1 blue 2 red 6 yellow 3 blue 4

In order to enter a two by two matrix which has a first row that contains 1 2 and a second row that contains 3 4 one would enter the following.

1 red 7 2 red 8 3 red 7 4

A quaternion would be entered using three red 6 sequences between four numbers.

Here is a link to the document with some four character sequences and some notes, including the notes relating to the optional use of this system in conjunction with the Astrolabe Channel numerical pointer.

Sequences of push button pushes to input information to Java Calculator Programs on the DVB-MHP platform using the minimum set of input events, part 3 of 3, with character codes.

 

Astrolabe Channel

Copyright 2002 William Overington

This file is accessible as follows.

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