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:
@@ -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
|
||||
|
||||

|
||||
|
||||
**Reporting problems**
|
||||
|
||||
If everything works properly for you, but your graphics application produces garbage on the
|
||||
|
||||
@@ -38,5 +38,7 @@
|
||||
62 38
|
||||
63 81
|
||||
// Z row
|
||||
// example of alt key (+128) - ALT a
|
||||
225 11084
|
||||
|
||||
|
||||
|
||||
BIN
apl/apltest
BIN
apl/apltest
Binary file not shown.
@@ -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
BIN
characterset.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
5
main.c
5
main.c
@@ -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;
|
||||
|
||||
4
tube.c
4
tube.c
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user