1
0
mirror of https://github.com/rricharz/Tek4010.git synced 2026-02-26 00:43:34 +00:00

alt-key added to APL conversion table

This commit is contained in:
¨Rene Richarz
2019-05-13 14:52:17 +02:00
parent 0dc08c834f
commit f67b2c9d5f
8 changed files with 34 additions and 14 deletions

View File

@@ -278,11 +278,14 @@ on your keyboard displaying a printable character (ASCII codes between 32 and 12
printable character. The file "aplkeys" in the folder "apl" provides an example of such a conversion
table. The first row in this file is the ASCII code of the key, and the second the translated code.
It is even possible to produce overstike glyphs by adding a second code multiplied by 256. You
can modify this table to match your keyboard and country code.
can modify this table to match your keyboard and country code. You can obtain the codes from the
screenshot below. To install the "aplkeys" table, type
mkdir ~/.tek4010conf
cp aplkeys ~/.tek4010conf
![character sets](characterset.png?raw=true "tek4010 character sets")
**Reporting problems**
If everything works properly for you, but your graphics application produces garbage on the

View File

@@ -38,5 +38,7 @@
62 38
63 81
// Z row
// example of alt key (+128) - ALT a
225 11084

Binary file not shown.

View File

@@ -7,24 +7,34 @@
int main (int argc, char *argv[])
{
int ch;
int ch, i;
printf("\nStandard character set:\n");
for (ch = 32; ch <= 126; ch++) {
if ((ch % 32) == 0) {
printf("\n%02X ", ch);
printf(" ");
for (i = 0; i < 10; i++) printf("%1d ",i);
for (ch = 30; ch <= 126; ch++) {
if ((ch % 10) == 0) {
printf("\n%03d ", ch);
}
printf("%c", ch);
if (ch > 32)
printf("%c ", ch);
else
printf(" ");
}
printf("\n");
printf("\nAPL character set:\n");
printf("\nTektronix APL character set:\n");
putchar(27); putchar(14); // switch to alternative character set
for (ch = 32; ch <= 126; ch++) {
if ((ch % 32) == 0) {
printf("\n%02X ", ch);
printf(" ");
for (i = 0; i < 10; i++) printf("%1d ",i);
for (ch = 30; ch <= 126; ch++) {
if ((ch % 10) == 0) {
printf("\n%03d ", ch);
}
printf("%c", ch);
if (ch >32)
printf("%c ", ch);
else
printf(" ");
}
printf("\n\noverstrike test");
putchar(62); putchar(32);

BIN
characterset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

5
main.c
View File

@@ -195,6 +195,11 @@ static void on_key_press(GtkWidget *widget, GdkEventKey *event, gpointer user_da
else if (event->keyval == 0xFF52) ch = 16; // arrow up for history up
else if (event->keyval == 0xFF54) ch = 14; // arrow down for history down
else if ((event->state & GDK_MOD1_MASK) && (aplMode)) { // alt key
printf("alt key, ch = %4X\n", event->keyval & 0x7F);
ch = (event->keyval & 0x7F) + 128;
}
// normal keys
else if ((event->keyval >= 0x0020) && (event->keyval <= 0x007F))
ch = event->keyval & 0x7F;

BIN
tek4010

Binary file not shown.

4
tube.c
View File

@@ -59,7 +59,7 @@ extern char *windowName;
// variables for APL keycode translator
#define MAXKEYCODES 128
#define MAXKEYCODES 256
struct keyCode {
int inputCode;
int outputCode;
@@ -273,7 +273,7 @@ void tube_init(int argc, char* argv[])
char *argv2[20];
size_t bufsize = 127;
int firstArg = 1;
printf("tek4010 version 1.3.4\n");
printf("tek4010 version 1.3.4B\n");
windowName = "Tektronix 4010/4014 emulator";
if ((argc<2) || (argc>19)) {
printf("Error:number of arguments\n");