special situation: is it easy to write an application for two users to use two sets of mice / keyboard?
- From: 张韡武 <zhangweiwu@xxxxxxxxxx>
- Date: Wed, 25 Oct 2006 08:14:30 +0800
Hello. It's actually a bit long: I worked out an application for a special
situation where the computer has to be used by both a clerk and a
customer at the same time, this is how I solved it:
I write part of this application in console, part in GUI. The computer has
two video cards, one set of PS/2 keyboard/mouse and one set of USB
keyboard/mouse.
When computer starts, console is displayed on first video card. X is
configured to start on second video card. X is configured to use USB mouse
and keyboard. The result is the clerk can operate the GUI with her mouse
and keyboard, the customer can use the other keyboard not occupied by X to
use a console application. They can use and talk to each other at the same
time.
Now the problem: the clerk wish to switch to another set of keyboard
during working without rebooting. She unplug current keyboard, plug
another on the computer, and then this 'other' keyboard become available
for the console rather then X. For example, X is configured to use
/dev/input/event4 (USB keyboard), after the clerk switch keyboard, USB
keyboard is /dev/input/event5. For X, it means no more keyboards there. I
hope I am clear;)
I think perhaps the solution is to write a daemon process to create a
device, e.g. /dev/input/clerk_keyboard and automaticlly forwared the
signal from any USB keyboard to this device (dynamically, e.g. should be
aware if keyboard switched). X should be configured to use
/dev/input/clerk_keyboard. However I am pretty new to C and Linux
development, I guess I should first come to the newsgroup to check if you
have ideas on how to make this happen without having to write own daemon
process.
Or perhaps there are such software existing already?
.
- Follow-Ups:
- Prev by Date: Re: which linux
- Next by Date: Re: Need to buy Windows to flash a BIOS?
- Previous by thread: PCI COM Board Question , Pls help , Urgent
- Next by thread: Re: special situation: is it easy to write an application for two users to use two sets of mice / keyboard?
- Index(es):
Relevant Pages
|