4

I have a linux box with two keyboards, two displays, and one mouse. One of the displays is running an X session, and the other is running a text console, started by mingetty. Currently, the mouse is used by X, one of the keyboards is used only by the text console, but the other keyboard sends input to both the X session and the text console.

Is there any way to have the second keyboard send input to only the X session?

2

Simplest way is probably to write an xorg.conf and configure the "other keyboard" with option GrabDevice as true. This will make sure the kernel input layer only outputs events from this device to X, which means the console won't see them.

You can test the effect of the grab with evtest --grab /dev/input/... (which will make evtest grab it, of course).

See man evdev for details, see Inputclass and Inputdevice in man xorg.conf on how to match your keyboard using hardware ids (or google, there are plenty of tutorials).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.