Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/ttpcmn/ttcmn.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9240 by zmatsuo, Mon May 10 14:11:24 2021 UTC revision 9243 by zmatsuo, Mon May 10 14:11:51 2021 UTC
# Line 59  typedef struct { Line 59  typedef struct {
59          size_t size_tttset;             /* sizeof TTTSet */          size_t size_tttset;             /* sizeof TTTSet */
60          /* Setup information from "teraterm.ini" */          /* Setup information from "teraterm.ini" */
61          TTTSet ts;          TTTSet ts;
         /* Key code map from "keyboard.def" */  
         TKeyMap km;  
62          // Window list          // Window list
63          int NWin;          int NWin;
64          HWND WinList[MAXNWIN];          HWND WinList[MAXNWIN];
# Line 186  void WINAPI RestartTeraTerm(HWND hwnd, P Line 184  void WINAPI RestartTeraTerm(HWND hwnd, P
184          }          }
185  }  }
186    
 void WINAPI ChangeDefaultSet(PTTSet ts, PKeyMap km)  
 {  
         if ((ts!=NULL) &&  
                 (_stricmp(ts->SetupFName, pm->ts.SetupFName) == 0)) {  
                 memcpy(&(pm->ts),ts,sizeof(TTTSet));  
         }  
         if (km!=NULL) {  
                 memcpy(&(pm->km),km,sizeof(TKeyMap));  
         }  
 }  
   
 void WINAPI GetDefaultSet(PTTSet ts)  
 {  
         memcpy(ts,&(pm->ts),sizeof(TTTSet));  
 }  
   
   
187  /* Key scan code -> Tera Term key code */  /* Key scan code -> Tera Term key code */
188  WORD WINAPI GetKeyCode(PKeyMap KeyMap, WORD Scan)  WORD WINAPI GetKeyCode(PKeyMap KeyMap, WORD Scan)
189  {  {
190          WORD Key;          WORD Key;
191    
         if (KeyMap==NULL) {  
                 KeyMap = &(pm->km);  
         }  
192          Key = IdKeyMax;          Key = IdKeyMax;
193          while ((Key>0) && (KeyMap->Map[Key-1] != Scan)) {          while ((Key>0) && (KeyMap->Map[Key-1] != Scan)) {
194                  Key--;                  Key--;
# Line 226  void WINAPI GetKeyStr(HWND HWin, PKeyMap Line 204  void WINAPI GetKeyStr(HWND HWin, PKeyMap
204          MSG Msg;          MSG Msg;
205          char Temp[201];          char Temp[201];
206    
         if (KeyMap==NULL) {  
                 KeyMap = &(pm->km);  
         }  
   
207          *Type = IdBinary;  // key type          *Type = IdBinary;  // key type
208          *Len = 0;          *Len = 0;
209          switch (KeyCode) {          switch (KeyCode) {

Legend:
Removed from v.9240  
changed lines
  Added in v.9243

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26