From 683364bc10f25fb26befec0bdd9215f2b327f645 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 9 Sep 2008 15:09:30 +0000 Subject: [PATCH] Some more work on the config tool git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@127 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- cfg_new/gfxcfg.c | 438 +++++++++++------- cfg_new/scancodes.h | 1040 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1319 insertions(+), 159 deletions(-) create mode 100644 cfg_new/scancodes.h diff --git a/cfg_new/gfxcfg.c b/cfg_new/gfxcfg.c index b056d03d..0875f055 100644 --- a/cfg_new/gfxcfg.c +++ b/cfg_new/gfxcfg.c @@ -12,35 +12,43 @@ //mine #include "SFont.h" +#include "scancodes.h" + /*** Constants ***/ #define NB_MAX_OPTIONS 134 +#define HAUTEUR_DEBUT_SETUP 7 +#define HAUTEUR_FIN_SETUP 44 + +/* Colors */ +#define COULEUR_SETUP 1 +#define COULEUR_SELECT 8 /*** Types definitions and structs ***/ typedef struct{ - uint16_t Numero; - uint16_t Touche; - uint16_t Touche2; - char Libelle[36]; - char Explic1[77]; - char Explic2[77]; - bool Erreur; - bool Suppr; + uint16_t Numero; + uint16_t Touche; + uint16_t Touche2; + char Libelle[36]; + char Explic1[77]; + char Explic2[77]; + bool Erreur; + bool Suppr; } Options; typedef struct{ - char Signature[3]; - uint8_t Version1; - uint8_t Version2; - uint8_t Beta1; - uint8_t Beta2; + char Signature[3]; + uint8_t Version1; + uint8_t Version2; + uint8_t Beta1; + uint8_t Beta2; } Type_header; #define Header_size 7 typedef struct{ - uint8_t Numero; - uint16_t Taille; + uint8_t Numero; + uint16_t Taille; } Type_chunk; #define Chunk_size 3 @@ -58,14 +66,63 @@ uint16_t NB_OPTIONS; /* Attend qu'une touche soit pressée. Retourne le keysym. */ SDL_keysym Lire_Touche(void) { - SDL_Event Event; + SDL_Event Event; - do{ - SDL_WaitEvent(&Event); - if(Event.type==SDL_KEYDOWN) break; - }while(1); + do{ + SDL_WaitEvent(&Event); + if(Event.type==SDL_KEYDOWN) break; + }while(1); - return Event.key.keysym; + return Event.key.keysym; +} + +/* Writes human-readable key name to buffer Temp. Temp must be at least 35 bytes long ! */ +void Nom_touche(uint16_t Touche,char* Temp) +{ + char Temp2[28]; + uint8_t Num_table =1; + + Temp[0] = Temp2[0] = 0; + + if((Touche & 0x0100) > 0) + { + strcat(Temp," + "); + Num_table = 2; + } + + if((Touche & 0x0200) > 0) + { + strcat(Temp," + "); + Num_table = 3; + } + + if((Touche & 0x0400) > 0) + { + strcat(Temp," + "); + Num_table = 4; + } + + switch(Num_table) + { + case 1: + strcpy(Temp2,Table_Normal[Touche & 0xFF]); + printf("k: %x\n",Touche & 0xFF); + if (strcmp(Temp2,"???") == 0) + strcpy(Temp,"********** Invalid key! **********"); + else if (Temp2[0]==0) + Temp[0]=0; + else + { + strcat(Temp,"<"); + strcat(Temp,Temp2); + strcat(Temp,">"); + } + break; + case 2: + strcpy(Temp2,Table_Shift[Touche & 0xFF]); + + break; + } } /*** Drawing functions ***/ @@ -73,136 +130,199 @@ SDL_keysym Lire_Touche(void) /* Draws a filled rectanble */ void Cadre(int x,int y,int w,int h,uint8_t color) { - SDL_Rect rct; - rct.x=x; - rct.y=y; - rct.w=w; - rct.h=h; - - SDL_FillRect(Ecran, &rct, color); + SDL_Rect rct; + rct.x=x; + rct.y=y; + rct.w=w; + rct.h=h; + + SDL_FillRect(Ecran, &rct, color); } /* Draws the main screen and welcome message */ void Dessiner_ecran_principal() { - Cadre(3,3,630,40,2); - SFont_Write(Ecran, MyFont, 8,6,"Setup program for Grafx2 (c) 1996-98 Sunset Design and 2008 PulkoMandy"); - SFont_Write(Ecran, MyFont, 8,18,"Use Up/Down arrows & Page-Up/Page-Down to scroll, Enter to modify, Delete to remove a hot-key, and Escape to validate or cancel."); - SFont_Write(Ecran, MyFont, 8,30,"DO NOT USE Print-screen, Pause, and other special keys!"); + Cadre(3,3,630,40,2); + SFont_Write(Ecran, MyFont, 8,6,"Setup program for Grafx2 (c) 1996-98 Sunset Design and 2008 PulkoMandy"); + SFont_Write(Ecran, MyFont, 8,18,"Use Up/Down arrows & Page-Up/Page-Down to scroll, Enter to modify, Delete to remove a hot-key, and Escape to validate or cancel."); + SFont_Write(Ecran, MyFont, 8,30,"DO NOT USE Print-screen, Pause, and other special keys!"); - Cadre(3,46,630,400,1); + Cadre(3,46,630,400,COULEUR_SETUP); + SFont_Write(Ecran,MyFont,8,48,"Option"); + SFont_Write(Ecran,MyFont,8*38,48,"Hot-Key"); + SFont_Write(Ecran,MyFont,8*75,48,"Err"); - SDL_UpdateRect(Ecran,0,0,640,480); + SDL_UpdateRect(Ecran,0,0,640,480); } +/* Displays informations about an option */ +void Ecrire(uint8_t Ligne, uint16_t Num_option, uint8_t Couleur) +{ + char NomTouche[35]; + puts(Config[Num_option].Libelle); + SFont_Write(Ecran,MyFont,8,Ligne*9,Config[Num_option].Libelle); + Nom_touche(Config[Num_option].Touche,NomTouche); + SFont_Write(Ecran,MyFont,40*8,Ligne*9,NomTouche); + if(Config[Num_option].Erreur) + SFont_Write(Ecran,MyFont,77*8,Ligne*9,"X"); + else + Cadre(77*8,Ligne*9,8,8,Couleur); +} + +/* Displays comment about an option */ +void Ecrire_commentaire(uint16_t Num_option) +{ + SFont_Write(Ecran,MyFont,8,50*9,Config[Num_option].Explic1); + SFont_Write(Ecran,MyFont,8,51*9,Config[Num_option].Explic2); +} + +/* Display the options list */ void Tout_ecrire(uint16_t Decalage_curseur,uint16_t Position_curseur) { - puts("TOUT ECRIRE UNIMPLEMENTED"); + uint8_t i = HAUTEUR_DEBUT_SETUP; + + Cadre(3,(HAUTEUR_DEBUT_SETUP+Position_curseur - 1)*9,630,8,COULEUR_SELECT); + + while(i<=HAUTEUR_FIN_SETUP && i <= NB_OPTIONS + HAUTEUR_DEBUT_SETUP) + { + Ecrire(i,Decalage_curseur+i-HAUTEUR_DEBUT_SETUP,COULEUR_SETUP); + i++; + } + + Cadre(36*8,46,1,400,255); + Cadre(78*8,46,1,400,255); + + Ecrire_commentaire(Decalage_curseur+Position_curseur-1); + SDL_UpdateRect(Ecran,0,0,640,480); } /*** Configuration handling functions ***/ /* Defines an option */ void Definir_option(uint16_t Numero, char* Libelle, char* Explic1, char* Explic2, bool Deletable, - uint16_t Default_key) + uint16_t Default_key) { - Config[Numero_definition_option].Numero = Numero; - Config[Numero_definition_option].Touche = Default_key; - Config[Numero_definition_option].Touche2 = 0xFF; - strncpy(Config[Numero_definition_option].Libelle,Libelle,36); - strncpy(Config[Numero_definition_option].Explic1,Explic1,77); - strncpy(Config[Numero_definition_option].Explic2,Explic2,77); - Config[Numero_definition_option].Erreur = false; - Config[Numero_definition_option].Suppr = Deletable; - Numero_definition_option ++ ; + Config[Numero_definition_option].Numero = Numero; + Config[Numero_definition_option].Touche = Default_key; + Config[Numero_definition_option].Touche2 = 0xFF; + strncpy(Config[Numero_definition_option].Libelle,Libelle,36); + strncpy(Config[Numero_definition_option].Explic1,Explic1,77); + strncpy(Config[Numero_definition_option].Explic2,Explic2,77); + Config[Numero_definition_option].Erreur = false; + Config[Numero_definition_option].Suppr = Deletable; + Numero_definition_option ++ ; } /* Initialize configuration */ bool Initialiser_config() { - bool Erreur = false; - FILE* Fichier_INI; + bool Erreur = false; + FILE* Fichier_INI; - Numero_definition_option = 0; + Numero_definition_option = 0; - Definir_option(0,"Scroll up", - "Scrolls the picture upwards, both in magnify and normal mode.", - "This hotkey cannot be removed.", - false, 0x48); // HAUT - Definir_option(1,"Scroll down", - "Scrolls the picture upwards, both in magnify and normal mode.", - "This hotkey cannot be removed.", - false, 0x48); // HAUT - Definir_option(2,"Scroll left", - "Scrolls the picture upwards, both in magnify and normal mode.", - "This hotkey cannot be removed.", - false, 0x48); // HAUT - Definir_option(3,"Scroll right", - "Scrolls the picture upwards, both in magnify and normal mode.", - "This hotkey cannot be removed.", - false, 0x48); // HAUT + Definir_option(0,"Scroll up", + "Scrolls the picture up, both in magnify and normal mode.", + "This hotkey cannot be removed.", + false, 0x48); // HAUT + Definir_option(1,"Scroll down", + "Scrolls the picture down, both in magnify and normal mode.", + "This hotkey cannot be removed.", + false, 0x50); // BAS + Definir_option(2,"Scroll left", + "Scrolls the picture to the left, both in magnify and normal mode.", + "This hotkey cannot be removed.", + false, 0x4B); // GAUCHE + Definir_option(3,"Scroll right", + "Scrolls the picture to the right, both in magnify and normal mode.", + "This hotkey cannot be removed.", + false, 0x4D); // DROITE + + + NB_OPTIONS = Numero_definition_option - 1; } uint8_t Fenetre_choix(uint8_t Largeur, uint8_t Hauteur, char* Titre, char* Choix, uint8_t Choix_debut, - uint8_t Couleur,uint8_t Couleur_choix) + uint8_t Couleur,uint8_t Couleur_choix) { - puts("FENETRE CHOIX UNIMPLEMENTED !!!"); - return 0; + puts("FENETRE CHOIX UNIMPLEMENTED !!!"); + return 0; } +/* Checks if some key is used twice */ void Test_duplic() { - puts("TEST DUPLIC UNIMPLEMENTED"); + uint16_t i,j; + bool Pas_encore_erreur; + + for(i=0;i" + /*35*/,"/ ?" + /*36*/,"???" + /*37*/,"Grey*" + /*38*/,"???" + /*39*/,"Space" + /*3A*/,"???" + /*3B*/,"F1" + /*3C*/,"F2" + /*3D*/,"F3" + /*3E*/,"F4" + /*3F*/,"F5" + /*40*/,"F6" + /*41*/,"F7" + /*42*/,"F8" + /*43*/,"F9" + /*44*/,"F10" + /*45*/,"???" + /*46*/,"???" + /*47*/,"Home" + /*48*/,"Up" + /*49*/,"PgUp" + /*4A*/,"Grey-" + /*4B*/,"Left" + /*4C*/,"Kpad5" + /*4D*/,"Right" + /*4E*/,"Grey+" + /*4F*/,"End" + /*50*/,"Down" + /*51*/,"PgDn" + /*52*/,"Ins" + /*53*/,"Del" + /*54*/,"???" + /*55*/,"???" + /*56*/,"Lft|" + /*57*/,"???" + /*58*/,"???" + /*59*/,"???" + /*5A*/,"???" + /*5B*/,"???" + /*5C*/,"???" + /*5D*/,"???" + /*5E*/,"???" + /*5F*/,"???" + /*60*/,"???" + /*61*/,"???" + /*62*/,"???" + /*63*/,"???" + /*64*/,"???" + /*65*/,"???" + /*66*/,"???" + /*67*/,"???" + /*68*/,"???" + /*69*/,"???" + /*6A*/,"???" + /*6B*/,"???" + /*6C*/,"???" + /*6D*/,"???" + /*6E*/,"???" + /*6F*/,"???" + /*70*/,"???" + /*71*/,"???" + /*72*/,"???" + /*73*/,"???" + /*74*/,"???" + /*75*/,"???" + /*76*/,"???" + /*77*/,"???" + /*78*/,"???" + /*79*/,"???" + /*7A*/,"???" + /*7B*/,"???" + /*7C*/,"???" + /*7D*/,"???" + /*7E*/,"???" + /*7F*/,"???" + /*80*/,"???" + /*81*/,"???" + /*82*/,"???" + /*83*/,"???" + /*84*/,"???" + /*85*/,"F11" + /*86*/,"F12" + /*87*/,"???" + /*88*/,"???" + /*89*/,"???" + /*8A*/,"???" + /*8B*/,"???" + /*8C*/,"???" + /*8D*/,"???" + /*8E*/,"???" + /*8F*/,"???" + /*90*/,"???" + /*91*/,"???" + /*92*/,"???" + /*93*/,"???" + /*94*/,"???" + /*95*/,"???" + /*96*/,"???" + /*97*/,"???" + /*98*/,"???" + /*99*/,"???" + /*9A*/,"???" + /*9B*/,"???" + /*9C*/,"???" + /*9D*/,"???" + /*9E*/,"???" + /*9F*/,"???" + /*A0*/,"???" + /*A1*/,"???" + /*A2*/,"???" + /*A3*/,"???" + /*A4*/,"???" + /*A5*/,"???" + /*A6*/,"???" + /*A7*/,"???" + /*A8*/,"???" + /*A9*/,"???" + /*AA*/,"???" + /*AB*/,"???" + /*AC*/,"???" + /*AD*/,"???" + /*AE*/,"???" + /*AF*/,"???" + /*B0*/,"???" + /*B1*/,"???" + /*B2*/,"???" + /*B3*/,"???" + /*B4*/,"???" + /*B5*/,"???" + /*B6*/,"Win L" + /*B7*/,"Win R" + /*B8*/,"Win M" + /*B9*/,"???" + /*BA*/,"???" + /*BB*/,"???" + /*BC*/,"???" + /*BD*/,"???" + /*BE*/,"???" + /*BF*/,"???" + /*C0*/,"???" + /*C1*/,"???" + /*C2*/,"???" + /*C3*/,"???" + /*C4*/,"???" + /*C5*/,"???" + /*C6*/,"???" + /*C7*/,"???" + /*C8*/,"???" + /*C9*/,"???" + /*CA*/,"???" + /*CB*/,"???" + /*CC*/,"???" + /*CD*/,"???" + /*CE*/,"???" + /*CF*/,"???" + /*D0*/,"???" + /*D1*/,"???" + /*D2*/,"???" + /*D3*/,"???" + /*D4*/,"???" + /*D5*/,"???" + /*D6*/,"???" + /*D7*/,"???" + /*D8*/,"???" + /*D9*/,"???" + /*DA*/,"???" + /*DB*/,"???" + /*DC*/,"???" + /*DD*/,"???" + /*DE*/,"???" + /*DF*/,"???" + /*E0*/,"Enter" + /*E1*/,"???" + /*E2*/,"???" + /*E3*/,"???" + /*E4*/,"???" + /*E5*/,"???" + /*E6*/,"???" + /*E7*/,"???" + /*E8*/,"???" + /*E9*/,"???" + /*EA*/,"???" + /*EB*/,"???" + /*EC*/,"???" + /*ED*/,"???" + /*EE*/,"???" + /*EF*/,"???" + /*F0*/,"???" + /*F1*/,"???" + /*F2*/,"???" + /*F3*/,"???" + /*F4*/,"???" + /*F5*/,"???" + /*F6*/,"???" + /*F7*/,"???" + /*F8*/,"???" + /*F9*/,"???" + /*FA*/,"???" + /*FB*/,"???" + /*FC*/,"???" + /*FD*/,"???" + /*FE*/,"???" + /*FF*/,"" +}; + +const char* Table_Shift[256] = +{ + /*00*/ "???" + /*01*/,"Esc" + /*02*/,"1 !" + /*03*/,"2 @" + /*04*/,"3 #" + /*05*/,"4 $" + /*06*/,"5 %" + /*07*/,"6 ^" + /*08*/,"7 &" + /*09*/,"8 *" + /*0A*/,"9 (" + /*0B*/,"0 )" + /*0C*/,"- _" + /*0D*/,"= +" + /*0E*/,"BkSpc" + /*0F*/,"Tab" + /*10*/,"Q" + /*11*/,"W" + /*12*/,"E" + /*13*/,"R" + /*14*/,"T" + /*15*/,"Y" + /*16*/,"U" + /*17*/,"I" + /*18*/,"O" + /*19*/,"P" + /*1A*/,"[ /*" + /*1B*/,"] */" + /*1C*/,"Retrn" + /*1D*/,"???" + /*1E*/,"A" + /*1F*/,"S" + /*20*/,"D" + /*21*/,"F" + /*22*/,"G" + /*23*/,"H" + /*24*/,"J" + /*25*/,"K" + /*26*/,"L" + /*27*/,"; :" + /*28*/,"' " + /*29*/,"` ~" + /*2A*/,"???" + /*2B*/,"\ |" + /*2C*/,"Z" + /*2D*/,"X" + /*2E*/,"C" + /*2F*/,"V" + /*30*/,"B" + /*31*/,"N" + /*32*/,"M" + /*33*/,", <" + /*34*/,". >" + /*35*/,"/ ?" + /*36*/,"???" + /*37*/,"Grey*" + /*38*/,"???" + /*39*/,"Space" + /*3A*/,"???" + /*3B*/,"???" + /*3C*/,"???" + /*3D*/,"???" + /*3E*/,"???" + /*3F*/,"???" + /*40*/,"???" + /*41*/,"???" + /*42*/,"???" + /*43*/,"???" + /*44*/,"???" + /*45*/,"???" + /*46*/,"???" + /*47*/,"Home" + /*48*/,"Up" + /*49*/,"PgUp" + /*4A*/,"Grey-" + /*4B*/,"Left" + /*4C*/,"Kpad5" + /*4D*/,"Right" + /*4E*/,"Grey+" + /*4F*/,"End" + /*50*/,"Down" + /*51*/,"PgDn" + /*52*/,"Ins" + /*53*/,"Del" + /*54*/,"F1" + /*55*/,"F2" + /*56*/,"F3" + /*57*/,"F4" + /*58*/,"F5" + /*59*/,"F6" + /*5A*/,"F7" + /*5B*/,"F8" + /*5C*/,"F9" + /*5D*/,"F10" + /*5E*/,"???" + /*5F*/,"???" + /*60*/,"???" + /*61*/,"???" + /*62*/,"???" + /*63*/,"???" + /*64*/,"???" + /*65*/,"???" + /*66*/,"???" + /*67*/,"???" + /*68*/,"???" + /*69*/,"???" + /*6A*/,"???" + /*6B*/,"???" + /*6C*/,"???" + /*6D*/,"???" + /*6E*/,"???" + /*6F*/,"???" + /*70*/,"???" + /*71*/,"???" + /*72*/,"???" + /*73*/,"???" + /*74*/,"???" + /*75*/,"???" + /*76*/,"???" + /*77*/,"???" + /*78*/,"???" + /*79*/,"???" + /*7A*/,"???" + /*7B*/,"???" + /*7C*/,"???" + /*7D*/,"???" + /*7E*/,"???" + /*7F*/,"???" + /*80*/,"???" + /*81*/,"???" + /*82*/,"???" + /*83*/,"???" + /*84*/,"???" + /*85*/,"???" + /*86*/,"???" + /*87*/,"F11" + /*88*/,"F12" + /*89*/,"???" + /*8A*/,"???" + /*8B*/,"???" + /*8C*/,"???" + /*8D*/,"???" + /*8E*/,"???" + /*8F*/,"???" + /*90*/,"???" + /*91*/,"???" + /*92*/,"???" + /*93*/,"???" + /*94*/,"???" + /*95*/,"???" + /*96*/,"???" + /*97*/,"???" + /*98*/,"???" + /*99*/,"???" + /*9A*/,"???" + /*9B*/,"???" + /*9C*/,"???" + /*9D*/,"???" + /*9E*/,"???" + /*9F*/,"???" + /*A0*/,"???" + /*A1*/,"???" + /*A2*/,"???" + /*A3*/,"???" + /*A4*/,"???" + /*A5*/,"???" + /*A6*/,"???" + /*A7*/,"???" + /*A8*/,"???" + /*A9*/,"???" + /*AA*/,"???" + /*AB*/,"???" + /*AC*/,"???" + /*AD*/,"???" + /*AE*/,"???" + /*AF*/,"???" + /*B0*/,"???" + /*B1*/,"???" + /*B2*/,"???" + /*B3*/,"???" + /*B4*/,"???" + /*B5*/,"???" + /*B6*/,"???" + /*B7*/,"???" + /*B8*/,"???" + /*B9*/,"???" + /*BA*/,"???" + /*BB*/,"???" + /*BC*/,"???" + /*BD*/,"???" + /*BE*/,"???" + /*BF*/,"???" + /*C0*/,"???" + /*C1*/,"???" + /*C2*/,"Win L" + /*C3*/,"Win R" + /*C4*/,"Win M" + /*C5*/,"???" + /*C6*/,"???" + /*C7*/,"???" + /*C8*/,"???" + /*C9*/,"???" + /*CA*/,"???" + /*CB*/,"???" + /*CC*/,"???" + /*CD*/,"???" + /*CE*/,"???" + /*CF*/,"???" + /*D0*/,"???" + /*D1*/,"???" + /*D2*/,"???" + /*D3*/,"???" + /*D4*/,"???" + /*D5*/,"???" + /*D6*/,"???" + /*D7*/,"???" + /*D8*/,"???" + /*D9*/,"???" + /*DA*/,"???" + /*DB*/,"???" + /*DC*/,"???" + /*DD*/,"???" + /*DE*/,"???" + /*DF*/,"???" + /*E0*/,"Enter" + /*E1*/,"???" + /*E2*/,"???" + /*E3*/,"???" + /*E4*/,"???" + /*E5*/,"???" + /*E6*/,"???" + /*E7*/,"???" + /*E8*/,"???" + /*E9*/,"???" + /*EA*/,"???" + /*EB*/,"???" + /*EC*/,"???" + /*ED*/,"???" + /*EE*/,"???" + /*EF*/,"???" + /*F0*/,"???" + /*F1*/,"???" + /*F2*/,"???" + /*F3*/,"???" + /*F4*/,"???" + /*F5*/,"???" + /*F6*/,"???" + /*F7*/,"???" + /*F8*/,"???" + /*F9*/,"???" + /*FA*/,"???" + /*FB*/,"???" + /*FC*/,"???" + /*FD*/,"???" + /*FE*/,"???" + /*FF*/,"???" +}; + +const char* Table_Ctrl[256] = +{ + /*00*/ "???" + /*01*/,"Esc" + /*02*/,"???" + /*03*/,"2 @" + /*04*/,"???" + /*05*/,"???" + /*06*/,"???" + /*07*/,"6 ^" + /*08*/,"???" + /*09*/,"8 *" + /*0A*/,"???" + /*0B*/,"???" + /*0C*/,"- _" + /*0D*/,"= +" + /*0E*/,"BkSpc" + /*0F*/,"???" + /*10*/,"Q" + /*11*/,"W" + /*12*/,"E" + /*13*/,"R" + /*14*/,"T" + /*15*/,"Y" + /*16*/,"U" + /*17*/,"I" + /*18*/,"O" + /*19*/,"P" + /*1A*/,"[ /*" + /*1B*/,"] */" + /*1C*/,"Retrn" + /*1D*/,"???" + /*1E*/,"A" + /*1F*/,"S" + /*20*/,"D" + /*21*/,"F" + /*22*/,"G" + /*23*/,"H" + /*24*/,"J" + /*25*/,"K" + /*26*/,"L" + /*27*/,"; :" + /*28*/,"???" + /*29*/,"???" + /*2A*/,"???" + /*2B*/,"\ |" + /*2C*/,"Z" + /*2D*/,"X" + /*2E*/,"C" + /*2F*/,"V" + /*30*/,"B" + /*31*/,"N" + /*32*/,"M" + /*33*/,"???" + /*34*/,"???" + /*35*/,"???" + /*36*/,"???" + /*37*/,"???" + /*38*/,"???" + /*39*/,"Space" + /*3A*/,"???" + /*3B*/,"???" + /*3C*/,"???" + /*3D*/,"???" + /*3E*/,"???" + /*3F*/,"???" + /*40*/,"???" + /*41*/,"???" + /*42*/,"???" + /*43*/,"???" + /*44*/,"???" + /*45*/,"???" + /*46*/,"???" + /*47*/,"???" + /*48*/,"???" + /*49*/,"???" + /*4A*/,"???" + /*4B*/,"???" + /*4C*/,"???" + /*4D*/,"???" + /*4E*/,"???" + /*4F*/,"???" + /*50*/,"???" + /*51*/,"???" + /*52*/,"???" + /*53*/,"???" + /*54*/,"???" + /*55*/,"???" + /*56*/,"???" + /*57*/,"???" + /*58*/,"???" + /*59*/,"???" + /*5A*/,"???" + /*5B*/,"???" + /*5C*/,"???" + /*5D*/,"???" + /*5E*/,"F1" + /*5F*/,"F2" + /*60*/,"F3" + /*61*/,"F4" + /*62*/,"F5" + /*63*/,"F6" + /*64*/,"F7" + /*65*/,"F8" + /*66*/,"F9" + /*67*/,"F10" + /*68*/,"???" + /*69*/,"???" + /*6A*/,"???" + /*6B*/,"???" + /*6C*/,"???" + /*6D*/,"???" + /*6E*/,"???" + /*6F*/,"???" + /*70*/,"???" + /*71*/,"???" + /*72*/,"???" + /*73*/,"Left" + /*74*/,"Right" + /*75*/,"End" + /*76*/,"PgDn" + /*77*/,"Home" + /*78*/,"???" + /*79*/,"???" + /*7A*/,"???" + /*7B*/,"???" + /*7C*/,"???" + /*7D*/,"???" + /*7E*/,"???" + /*7F*/,"???" + /*80*/,"???" + /*81*/,"???" + /*82*/,"???" + /*83*/,"???" + /*84*/,"PgUp" + /*85*/,"???" + /*86*/,"???" + /*87*/,"???" + /*88*/,"???" + /*89*/,"F11" + /*8A*/,"F12" + /*8B*/,"???" + /*8C*/,"???" + /*8D*/,"Up" + /*8E*/,"Grey-" + /*8F*/,"Keyp5" + /*90*/,"Grey+" + /*91*/,"Down" + /*92*/,"Ins" + /*93*/,"Del" + /*94*/,"Tab" + /*95*/,"Grey/" + /*96*/,"Grey*" + /*97*/,"???" + /*98*/,"???" + /*99*/,"???" + /*9A*/,"???" + /*9B*/,"???" + /*9C*/,"???" + /*9D*/,"???" + /*9E*/,"???" + /*9F*/,"???" + /*A0*/,"???" + /*A1*/,"???" + /*A2*/,"???" + /*A3*/,"???" + /*A4*/,"???" + /*A5*/,"???" + /*A6*/,"???" + /*A7*/,"???" + /*A8*/,"???" + /*A9*/,"???" + /*AA*/,"???" + /*AB*/,"???" + /*AC*/,"???" + /*AD*/,"???" + /*AE*/,"???" + /*AF*/,"???" + /*B0*/,"???" + /*B1*/,"???" + /*B2*/,"???" + /*B3*/,"???" + /*B4*/,"???" + /*B5*/,"???" + /*B6*/,"???" + /*B7*/,"???" + /*B8*/,"???" + /*B9*/,"???" + /*BA*/,"???" + /*BB*/,"???" + /*BC*/,"???" + /*BD*/,"???" + /*BE*/,"???" + /*BF*/,"???" + /*C0*/,"???" + /*C1*/,"???" + /*C2*/,"???" + /*C3*/,"???" + /*C4*/,"???" + /*C5*/,"???" + /*C6*/,"???" + /*C7*/,"???" + /*C8*/,"???" + /*C9*/,"???" + /*CA*/,"???" + /*CB*/,"???" + /*CC*/,"???" + /*CD*/,"???" + /*CE*/,"Win L" + /*CF*/,"Win R" + /*D0*/,"Win M" + /*D1*/,"???" + /*D2*/,"???" + /*D3*/,"???" + /*D4*/,"???" + /*D5*/,"???" + /*D6*/,"???" + /*D7*/,"???" + /*D8*/,"???" + /*D9*/,"???" + /*DA*/,"???" + /*DB*/,"???" + /*DC*/,"???" + /*DD*/,"???" + /*DE*/,"???" + /*DF*/,"???" + /*E0*/,"Enter" + /*E1*/,"???" + /*E2*/,"???" + /*E3*/,"???" + /*E4*/,"???" + /*E5*/,"???" + /*E6*/,"???" + /*E7*/,"???" + /*E8*/,"???" + /*E9*/,"???" + /*EA*/,"???" + /*EB*/,"???" + /*EC*/,"???" + /*ED*/,"???" + /*EE*/,"???" + /*EF*/,"???" + /*F0*/,"???" + /*F1*/,"???" + /*F2*/,"???" + /*F3*/,"???" + /*F4*/,"???" + /*F5*/,"???" + /*F6*/,"???" + /*F7*/,"???" + /*F8*/,"???" + /*F9*/,"???" + /*FA*/,"???" + /*FB*/,"???" + /*FC*/,"???" + /*FD*/,"???" + /*FE*/,"???" + /*FF*/,"???" +}; + +const char* Table_Alt[256] = +{ + /*00*/ "???" + /*01*/,"Esc" + /*02*/,"???" + /*03*/,"???" + /*04*/,"???" + /*05*/,"???" + /*06*/,"???" + /*07*/,"???" + /*08*/,"???" + /*09*/,"???" + /*0A*/,"???" + /*0B*/,"???" + /*0C*/,"???" + /*0D*/,"???" + /*0E*/,"BkSpc" + /*0F*/,"???" + /*10*/,"Q" + /*11*/,"W" + /*12*/,"E" + /*13*/,"R" + /*14*/,"T" + /*15*/,"Y" + /*16*/,"U" + /*17*/,"I" + /*18*/,"O" + /*19*/,"P" + /*1A*/,"[ /*" + /*1B*/,"] */" + /*1C*/,"Retrn" + /*1D*/,"???" + /*1E*/,"A" + /*1F*/,"S" + /*20*/,"D" + /*21*/,"F" + /*22*/,"G" + /*23*/,"H" + /*24*/,"J" + /*25*/,"K" + /*26*/,"L" + /*27*/,"; :" + /*28*/,"' " + /*29*/,"` ~" + /*2A*/,"???" + /*2B*/,"\ |" + /*2C*/,"Z" + /*2D*/,"X" + /*2E*/,"C" + /*2F*/,"V" + /*30*/,"B" + /*31*/,"N" + /*32*/,"M" + /*33*/,", <" + /*34*/,". >" + /*35*/,"/ ?" + /*36*/,"???" + /*37*/,"Grey*" + /*38*/,"???" + /*39*/,"Space" + /*3A*/,"???" + /*3B*/,"???" + /*3C*/,"???" + /*3D*/,"???" + /*3E*/,"???" + /*3F*/,"???" + /*40*/,"???" + /*41*/,"???" + /*42*/,"???" + /*43*/,"???" + /*44*/,"???" + /*45*/,"???" + /*46*/,"???" + /*47*/,"???" + /*48*/,"???" + /*49*/,"???" + /*4A*/,"Grey-" + /*4B*/,"???" + /*4C*/,"???" + /*4D*/,"???" + /*4E*/,"Grey+" + /*4F*/,"???" + /*50*/,"???" + /*51*/,"???" + /*52*/,"???" + /*53*/,"???" + /*54*/,"???" + /*55*/,"???" + /*56*/,"???" + /*57*/,"???" + /*58*/,"???" + /*59*/,"???" + /*5A*/,"???" + /*5B*/,"???" + /*5C*/,"???" + /*5D*/,"???" + /*5E*/,"???" + /*5F*/,"???" + /*60*/,"???" + /*61*/,"???" + /*62*/,"???" + /*63*/,"???" + /*64*/,"???" + /*65*/,"???" + /*66*/,"???" + /*67*/,"???" + /*68*/,"F1" + /*69*/,"F2" + /*6A*/,"F3" + /*6B*/,"F4" + /*6C*/,"F5" + /*6D*/,"F6" + /*6E*/,"F7" + /*6F*/,"F8" + /*70*/,"F9" + /*71*/,"F10" + /*72*/,"???" + /*73*/,"???" + /*74*/,"???" + /*75*/,"???" + /*76*/,"???" + /*77*/,"???" + /*78*/,"1 !" + /*79*/,"2 @" + /*7A*/,"3 #" + /*7B*/,"4 $" + /*7C*/,"5 %" + /*7D*/,"6 ^" + /*7E*/,"7 &" + /*7F*/,"8 *" + /*80*/,"9 (" + /*81*/,"0 )" + /*82*/,"- _" + /*83*/,"= +" + /*84*/,"???" + /*85*/,"???" + /*86*/,"???" + /*87*/,"???" + /*88*/,"???" + /*89*/,"???" + /*8A*/,"???" + /*8B*/,"F11" + /*8C*/,"F12" + /*8D*/,"???" + /*8E*/,"???" + /*8F*/,"???" + /*90*/,"???" + /*91*/,"???" + /*92*/,"???" + /*93*/,"???" + /*94*/,"???" + /*95*/,"???" + /*96*/,"???" + /*97*/,"Home" + /*98*/,"Up" + /*99*/,"PgUp" + /*9A*/,"???" + /*9B*/,"Left" + /*9C*/,"???" + /*9D*/,"Right" + /*9E*/,"???" + /*9F*/,"End" + /*A0*/,"Down" + /*A1*/,"PgDn" + /*A2*/,"Ins" + /*A3*/,"Del" + /*A4*/,"Grey/" + /*A5*/,"Tab" + /*A6*/,"Enter" + /*A7*/,"???" + /*A8*/,"???" + /*A9*/,"???" + /*AA*/,"???" + /*AB*/,"???" + /*AC*/,"???" + /*AD*/,"???" + /*AE*/,"???" + /*AF*/,"???" + /*B0*/,"???" + /*B1*/,"???" + /*B2*/,"???" + /*B3*/,"???" + /*B4*/,"???" + /*B5*/,"???" + /*B6*/,"???" + /*B7*/,"???" + /*B8*/,"???" + /*B9*/,"???" + /*BA*/,"???" + /*BB*/,"???" + /*BC*/,"???" + /*BD*/,"???" + /*BE*/,"???" + /*BF*/,"???" + /*C0*/,"???" + /*C1*/,"???" + /*C2*/,"???" + /*C3*/,"???" + /*C4*/,"???" + /*C5*/,"???" + /*C6*/,"???" + /*C7*/,"???" + /*C8*/,"???" + /*C9*/,"???" + /*CA*/,"???" + /*CB*/,"???" + /*CC*/,"???" + /*CD*/,"???" + /*CE*/,"???" + /*CF*/,"???" + /*D0*/,"???" + /*D1*/,"???" + /*D2*/,"???" + /*D3*/,"???" + /*D4*/,"???" + /*D5*/,"???" + /*D6*/,"???" + /*D7*/,"???" + /*D8*/,"???" + /*D9*/,"???" + /*DA*/,"Win L" + /*DB*/,"Win R" + /*DC*/,"Win M" + /*DD*/,"???" + /*DE*/,"???" + /*DF*/,"???" + /*E0*/,"???" + /*E1*/,"???" + /*E2*/,"???" + /*E3*/,"???" + /*E4*/,"???" + /*E5*/,"???" + /*E6*/,"???" + /*E7*/,"???" + /*E8*/,"???" + /*E9*/,"???" + /*EA*/,"???" + /*EB*/,"???" + /*EC*/,"???" + /*ED*/,"???" + /*EE*/,"???" + /*EF*/,"???" + /*F0*/,"???" + /*F1*/,"???" + /*F2*/,"???" + /*F3*/,"???" + /*F4*/,"???" + /*F5*/,"???" + /*F6*/,"???" + /*F7*/,"???" + /*F8*/,"???" + /*F9*/,"???" + /*FA*/,"???" + /*FB*/,"???" + /*FC*/,"???" + /*FD*/,"???" + /*FE*/,"???" + /*FF*/,"???" +};