Update of /cvsroot/squeak/squeak/platforms/unix/vm-display-fbdev
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4219
Modified Files:
sqUnixFBDevKeyboard.c
Log Message:
Print more detailed diagnostics when debugging.
Index: sqUnixFBDevKeyboard.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm-display-fbdev/sqUnixFBDevKeyboard.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqUnixFBDevKeyboard.c 22 Aug 2003 17:07:15 -0000 1.3
--- sqUnixFBDevKeyboard.c 3 Apr 2004 10:33:14 -0000 1.4
***************
*** 80,84 ****
if (kstate & (1 << KG_ALT)) modifierState |= CommandKeyBit;
if (kstate & (1 << KG_ALTGR)) modifierState |= OptionKeyBit;
! dprintf("state %2d %02x mod %2d %02x\n", kstate, modifierState);
}
--- 80,84 ----
if (kstate & (1 << KG_ALT)) modifierState |= CommandKeyBit;
if (kstate & (1 << KG_ALTGR)) modifierState |= OptionKeyBit;
! dprintf("state %02x mod %02x\n", kstate, modifierState);
}
***************
*** 104,111 ****
static void kb_post(_self, int code, int up)
{
- dprintf("KEY %3d %02x %c %s state %02x mod %02x\n",
- code, code, ((code > 32) && (code < 127)) ? code : ' ',
- up ? "UP" : "DOWN", self->state, modifierState);
-
if (code == 127) code= 8; //xxx OPTION!!!
self->callback(code, up, modifierState);
--- 104,107 ----
***************
*** 119,126 ****
--- 115,126 ----
int rep= (!up) && (prev == code);
prev= up ? 0 : code;
+
+ dprintf("+++ code %d up %d prev %d rep %d map %p\n", code, up, prev, rep, keyMap);
+
if (keyMap)
{
int sym= keyMap[code];
int type= KTYP(sym);
+ dprintf("+++ sym %x (%02x) type %d\n", sym, sym & 255, type);
sym &= 255;
if (type >= 0xf0) // shiftable
***************
*** 128,131 ****
--- 128,132 ----
if (KT_LETTER == type) // lockable
type= KT_LATIN;
+ dprintf("+++ type %d\n", type);
switch (type)
{
***************
*** 182,190 ****
static int kb_handleEvents(_self)
{
while (fdReadable(self->fd, 0))
{
unsigned char buf;
if (1 == read(self->fd, &buf, 1))
! kb_translate(self, buf & 127, (buf >> 7) & 1);
}
return 0;
--- 183,195 ----
static int kb_handleEvents(_self)
{
+ dprintf("+++ kb_handleEvents\n");
while (fdReadable(self->fd, 0))
{
unsigned char buf;
if (1 == read(self->fd, &buf, 1))
! {
! dprintf("+++ kb_translate %3d %02x + %d\n", buf & 127, buf & 127, (buf >> 7) & 1);
! kb_translate(self, buf & 127, (buf >> 7) & 1);
! }
}
return 0;
|