Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 1997 02:45:37 -0700 (MST)
From:      Kurt Olsen <kurto@bootp.sls.usu.edu>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   libvgl problems?
Message-ID:  <199710300945.CAA25047@bootp.sls.usu.edu>

next in thread | raw e-mail | index | archive | help
I was playing with libvgl this evening and found a rather disturbing
bug.  On my particular keyboard the VGLKeyboardGetCh() call doesn't
return anything for the make code on the occurance of a 'u' or TAB.
I get the break codes all right but not the make codes.  Anybody else
seen this?  I get the same behavior under CODEKEYS and RAWKEYS.

Here's a short program I wrote to check out which codes were returned
for which keys, as a side effect it demonstrates this problem nicely.

Kurt Olsen
kurto@bootp.sls.usu.edu

#include <stdio.h>
#include <vgl.h>
#include <machine/console.h>

void main(void)
{
  int i,j,k;

  VGLInit(M_C80x25);
#if 1
  VGLKeyboardInit(VGL_CODEKEYS);
#else
  VGLKeyboardInit(VGL_RAWKEYS);
#endif
  for (i=0; i < 500000; i++)
    {
    j = VGLKeyboardGetCh();
    if (j>0) printf("%c%c%02x", 0xd, 0xa, j);
    else if (k > 100000) { printf(".",j); k=0; fflush(stdout);}
    k++;
    }

  VGLKeyboardEnd();
  VGLEnd(); 
}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710300945.CAA25047>