VT100TerminalView.st
changeset 4291 fd935fa1dfec
parent 4289 c20408301621
child 4293 ade403689ce1
--- a/VT100TerminalView.st	Tue Jul 23 15:59:55 2013 +0200
+++ b/VT100TerminalView.st	Tue Jul 23 16:00:09 2013 +0200
@@ -22,6 +22,8 @@
 
 ansiEscapes
 "
+   see also: http://www.vt100.net/docs/vt100-ug/chapter3.html
+
                               ANSI ESCAPE SEQUENCES
 ===============================================================================
 Wherever you see '#', that should be replaced by the appropriate number.
@@ -403,6 +405,7 @@
 "/        rangeEndLine := rangeStartLine := nil.
 "/    ].
 
+    alternateKeypadMode := false.
 "/    autoLineFeed := false.
 "/    autoMargin := true.
 "/    displayMode := 0.                "Normal display"!! !!
@@ -417,7 +420,7 @@
     super initialize.
 
     autoWrapFlag := true.
-
+    alternateKeypadMode := false.
     parameters := Array new:8.
     self endOfSequence
 
@@ -566,6 +569,7 @@
             show:' got: ';
             showCR:char storeString
     ].
+"/ char == Character return ifTrue:[self halt].
     state == 0 ifTrue:[
         processCharacterReturn := self processState0:char.
         self evaluateProcessCharacter:char return:processCharacterReturn.
@@ -639,7 +643,7 @@
         ].
 
         (char == Character return) ifTrue:[
-            true " (rangeEndLine notNil and:[rangeEndLine ~~ numberOfLines])" ifTrue:[
+            (rangeEndLine notNil and:[rangeEndLine ~~ numberOfLines]) ifTrue:[
                 self endEntry.
                 self cursorToBeginOfLine.
             ] ifFalse:[
@@ -928,14 +932,16 @@
         ^ #sequenceComplete
     ].
     char == $= ifTrue: [
-        "/ enter apllication keypad mode
+        "/ enter application keypad mode
         "/ ESC-=
-        ^ #unknown
+        alternateKeypadMode := true.
+        ^ #sequenceComplete
     ].
     char == $> ifTrue: [
-        "/ exit apllication keypad mode
+        "/ exit application keypad mode
         "/ ESC-<
-        ^ #unknown
+        alternateKeypadMode := false.
+        ^ #sequenceComplete
     ].
     ^ #unknown
 !
@@ -954,6 +960,7 @@
         super nextPut:Character cr.
         ^ #sequenceComplete.
     ].
+
     self endEntry.
     self cursorToBeginOfLine.
 
@@ -1027,10 +1034,10 @@
 !VT100TerminalView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/VT100TerminalView.st,v 1.51 2013-07-23 12:16:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/VT100TerminalView.st,v 1.52 2013-07-23 14:00:09 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/VT100TerminalView.st,v 1.51 2013-07-23 12:16:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/VT100TerminalView.st,v 1.52 2013-07-23 14:00:09 cg Exp $'
 ! !