[BRLTTY] gotoline for ht driver

Mario Lang mlang at delysid.org
Fri Mar 3 16:28:20 EST 2006


Hi.

This is pretty useful!  However, I'd like to make the second
gotoline do the reverse, but for that, I need the number of rows of
the current screen.  Can a driver retrieve that easily?  I mean, the
second definition should gotoline from the bottom of the screen.

Index: BrailleDrivers/HandyTech/braille.c
===================================================================
--- BrailleDrivers/HandyTech/braille.c	(revision 2137)
+++ BrailleDrivers/HandyTech/braille.c	(working copy)
@@ -1107,6 +1142,12 @@
       case (ROCKER_RIGHT_BOTTOM):
         *command = BRL_BLK_CUTRECT + keys->column;
         return 1;
+      case (ROCKER_LEFT_TOP | ROCKER_RIGHT_TOP):
+	*command = BRL_BLK_GOTOLINE + keys->column;
+	return 1;
+      case (ROCKER_LEFT_BOTTOM | ROCKER_RIGHT_BOTTOM):
+	*command = BRL_BLK_GOTOLINE + (model->columns - keys->column - 1);
+	return 1;
     }
   } else if (keys->status >= 0) {
     switch (keys->front) {

-- 
CYa,
  Mario


More information about the BRLTTY mailing list