From: Pásztor Szilárd (silicon@inf.bme.hu)
Date: Sun 02 Apr 2000 - 07:08:06 IST
Hi My problem is quite odd but big. I want to use an application that sits on X as a graphical output but uses svgalib for keyboard and mouse handling. With getting X to use /dev/gpmdata as a fake mouse device (and thus not touching /dev/mouse actually), mouse handling works perfectly. However, I couldn't do this to the keyboard so far. I needed to hack the X server source in order to have it leave the keyboard free and I hope I succeeded in it. The bigger trouble comes when initializing the keyboard because it calls __svgalib_open_devconsole() which initializes graphical output as well but I don't need it. So I commented out some parts in this function of svgalib and here's what I have at its current state: if ((__svgalib_tty_fd = open("/dev/console", O_RDONLY)) < 0) { printf("svgalib: can't open /dev/console \n"); exit(1); } ioctl(__svgalib_tty_fd, VT_OPENQRY, &svgalib_vc); sprintf(fname, "/dev/tty%d", svgalib_vc); if (svgalib_vc != vts.v_active) { startup_vc = vts.v_active; ioctl(__svgalib_tty_fd, VT_ACTIVATE, svgalib_vc); __svgalib_waitvtactive(); } These lines are the last part of the function with the initial RDWR open changed to RDONLY and the whole "allocated virtual console" part commented out. I know little about svgalib itself so I might have done incorrect things. The problem is that I seem to have no keyboard input with svgalib, I get the characters typed in appearing "behind" X on the same console. Specifically, I start the X server for example on /dev/tty10, start the proggy that opens its window and works but whatever I do, no keyboard access. I terminate the X server and then see my tries typed into the console just where X was closed. So, it looks like it is opening the terminal but can't fetch the input from it. Keyboard handler function is set properly. I'd really appreciate any help on what I'm doing wrong. greets surmoka p.s. keyboard and mouse handling of X is not acceptable in this case (X based glquakeworld). -------------------------------------------- | "..." - James LaBrie, Hell's Kitchen | --------------------------------------------
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST