[BRLTTY] Almost done with my brltty driver...

timothyhobbs at seznam.cz timothyhobbs at seznam.cz
Mon Mar 12 17:31:13 EDT 2012


Hello, this is Tim again.  I'm the one working on those FCHAD devices(the low cost single cell open source braille displays).  I have gotten to the point where I'm almost done with the driver.  But I cannot seem to figure out how brltty deals with key commands.  Specifically, I want to be able to send orca the scroll right/left key commands and "cell pressed" key commands.  Right now, I have this working:
static int
brl_readCommand (BrailleDisplay *brl, KeyTableCommandContext context) {
  sem_wait(&key_waiting);
  switch(key){
      case SCROLL_LEFT: printf("SCROLL_LEFT\n");break;
      case SCROLL_RIGHT: printf("SCROLL_RIGHT\n");break;
      default:printf("Keypress%d \n",key);
  }
  return EOF;
}

what should I put in the place of those printf's?
That last default, is when a braille cell's button gets pressed.
Here is the rest of my code: https://github.com/timthelion/FCHAD/blob/master/braille.c

I must note, that I got distracted by trying to make a protocol "the right way(tm)" with device parameter initializations and checksums and such.  I found it was impossible because the arduino's serial just was not reliable...  I now simply send bytes single bytes indicating which braille character to display to the arduino, and handle the rest within the brltty driver.  This is a much less flexible method, but it works and was much much easier to write...

Anyways, thank you for your time in reading this, and thank you for your help,
Timothy Hobbs


More information about the BRLTTY mailing list