[Ttssh2-commit] [3441] AltキーでMSBをセットした文字を送信できるようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 6月 5日 (金) 16:00:43 JST


Revision: 3441
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3441
Author:   doda
Date:     2009-06-05 16:00:43 +0900 (Fri, 05 Jun 2009)

Log Message:
-----------
AltキーでMSBをセットした文字を送信できるようにした。
使用するためには MetaKey=on かつ Meta8Bit=on に設定する必要あり。

Modified Paths:
--------------
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/ttpset/ttset.c


-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2009-06-04 13:16:40 UTC (rev 3440)
+++ trunk/teraterm/common/tttypes.h	2009-06-05 07:00:43 UTC (rev 3441)
@@ -456,6 +456,7 @@
 	WORD DisableAcceleratorDuplicateSession;
 	int PasteDelayPerLine;
 	WORD FontScaling;
+	WORD Meta8Bit;
 };
 
 typedef struct tttset TTTSet, *PTTSet;
@@ -895,6 +896,8 @@
  *   added tttset.ClearScreenOnCloseConnection.
  *   added tttset.DisableAcceleratorDuplicateSession.
  *   added tttset.PasteDelayPerLine.
+ *   added tttset.FontScaling.
+ *   added tttset.Meta8Bit.
  *
  * - At version 4.62, ttset_memfilemap was replaced with ttset_memfilemap_10.
  *   added tttset.DisableMouseTrackingByCtrl.

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2009-06-04 13:16:40 UTC (rev 3440)
+++ trunk/teraterm/teraterm/vtwin.cpp	2009-06-05 07:00:43 UTC (rev 3441)
@@ -2560,22 +2560,27 @@
 	}
 #endif
 
-	if (ts.MetaKey>0)
-	{
+	if (ts.MetaKey) {
 		if (!KeybEnabled || (TalkStatus!=IdTalkKeyb)) return;
 		Code = nChar;
-		for (i=1 ; i<=nRepCnt ; i++)
-		{
-			CommTextOut(&cv,&e,1);
+		for (i=1 ; i<=nRepCnt ; i++) {
+			if (ts.Meta8Bit) {
+				Code |= 0x80;
+			}
+			else {
+				CommTextOut(&cv,&e,1);
+				if (ts.LocalEcho) {
+					CommTextEcho(&cv,&e,1);
+				}
+			}
 			CommTextOut(&cv,&Code,1);
-			if (ts.LocalEcho>0)
-			{
-				CommTextEcho(&cv,&e,1);
+			if (ts.LocalEcho) {
 				CommTextEcho(&cv,&Code,1);
 			}
 		}
 		return;
 	}
+
 	CFrameWnd::OnSysChar(nChar, nRepCnt, nFlags);
 }
 

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2009-06-04 13:16:40 UTC (rev 3440)
+++ trunk/teraterm/ttpset/ttset.c	2009-06-05 07:00:43 UTC (rev 3441)
@@ -1291,6 +1291,9 @@
 
 	// Font scaling -- test
 	ts->FontScaling = GetOnOff(Section, "FontScaling", FName, FALSE);
+
+	// Meta sets MSB
+	ts->Meta8Bit = GetOnOff(Section, "Meta8Bit", FName, FALSE);
 }
 
 void FAR PASCAL WriteIniFile(PCHAR FName, PTTSet ts)
@@ -2236,6 +2239,9 @@
 	// added PasteDelayPerLine (2009.4.12 maya)
 	WriteInt(Section, "PasteDelayPerLine", FName,
 	         ts->PasteDelayPerLine);
+
+	// Meta sets MSB
+	WriteOnOff(Section, "Meta8Bit", FName, ts->Meta8Bit);
 }
 
 #define VTEditor "VT editor keypad"



Ttssh2-commit メーリングリストの案内
Back to archive index