Ver código fonte

Use Enable/Disable Mouse and MouseMode.

Steve Thielemann 2 anos atrás
pai
commit
999d993ec5
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      testdoor/testdoor.go

+ 5 - 2
testdoor/testdoor.go

@@ -682,7 +682,9 @@ func main() {
 	// cterm.txt +687
 	// cterm.txt +687
 	// d.Write("\x1b[?9h") // enable mouse X10 support
 	// d.Write("\x1b[?9h") // enable mouse X10 support
 	// d.Write("\x1b[?1000h") // enable any-event mouse
 	// d.Write("\x1b[?1000h") // enable any-event mouse
-	d.Write("\x1b[?1002h")
+	// d.Write("\x1b[?1002h")
+    // d.Write("\x1b[?1006h") // SGR style mouse. -- not supported in term
+    d.EnableMouse(door.AnyEvent)
 	// 1006 does not work in xterm or syncterm.
 	// 1006 does not work in xterm or syncterm.
 	press_keys(&d)
 	press_keys(&d)
 	// press_a_key(&d)
 	// press_a_key(&d)
@@ -760,7 +762,8 @@ func main() {
 	}
 	}
 
 
 	// d.Write("\x1b[?1000l") // disable mouse
 	// d.Write("\x1b[?1000l") // disable mouse
-	d.Write("\x1b[?1002l")
+	// d.Write("\x1b[?1002l")
+    d.DisableMouse()
 	d.Write(door.Reset + door.CRNL)
 	d.Write(door.Reset + door.CRNL)
 
 
 	message = fmt.Sprintf("Returning to the %s BBS..."+door.CRNL, d.Config.BBSID)
 	message = fmt.Sprintf("Returning to the %s BBS..."+door.CRNL, d.Config.BBSID)