[Ttssh2-commit] [3805] KEYBOARD. CNF で ALT+Key に機能や文字列を割り当てた時、余計な文字列が追加で出力されるのを修正。

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2010年 3月 4日 (木) 10:19:38 JST


Revision: 3805
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3805
Author:   doda
Date:     2010-03-04 10:19:38 +0900 (Thu, 04 Mar 2010)

Log Message:
-----------
KEYBOARD.CNF で ALT+Key に機能や文字列を割り当てた時、余計な文字列が追加で出力されるのを修正。
# http://logmett.com/forum/viewtopic.php?f=2&t=1332

Modified Paths:
--------------
    trunk/teraterm/teraterm/keyboard.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/keyboard.c
===================================================================
--- trunk/teraterm/teraterm/keyboard.c	2010-02-25 12:38:47 UTC (rev 3804)
+++ trunk/teraterm/teraterm/keyboard.c	2010-03-04 01:19:38 UTC (rev 3805)
@@ -615,18 +615,22 @@
       PeekMessage((LPMSG)&M,HWin,WM_SYSCHAR,WM_SYSCHAR,PM_REMOVE);
     }
   }
-  else if ((IdUDK6<=Key) && (Key<=IdUDK20) &&
-	   (FuncKeyLen[Key-IdUDK6]>0))
-  {
-    memcpy(Code,&FuncKeyStr[Key-IdUDK6][0],FuncKeyLen[Key-IdUDK6]);
-    CodeLength = FuncKeyLen[Key-IdUDK6];
-    CodeType = IdBinary;
+  else {
+    if ((ts.MetaKey>0) && AltKey()) {
+      PeekMessage((LPMSG)&M,HWin,WM_SYSCHAR,WM_SYSCHAR,PM_REMOVE);
+    }
+
+    if ((IdUDK6<=Key) && (Key<=IdUDK20) && (FuncKeyLen[Key-IdUDK6]>0)) {
+      memcpy(Code,&FuncKeyStr[Key-IdUDK6][0],FuncKeyLen[Key-IdUDK6]);
+      CodeLength = FuncKeyLen[Key-IdUDK6];
+      CodeType = IdBinary;
+    }
+    else
+      GetKeyStr(HWin,KeyMap,Key,
+                AppliKeyMode && ! ts.DisableAppKeypad,
+                AppliCursorMode && ! ts.DisableAppCursor,
+                Send8BitMode, Code, sizeof(Code), &CodeLength, &CodeType);
   }
-  else
-    GetKeyStr(HWin,KeyMap,Key,
-              AppliKeyMode && ! ts.DisableAppKeypad,
-              AppliCursorMode && ! ts.DisableAppCursor,
-              Send8BitMode, Code, sizeof(Code), &CodeLength, &CodeType);
 
   if (CodeLength==0) return KEYDOWN_OTHER;
 



Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る