XLib programming. Keyboard grab.

Автор: vikont Дата: 30.03.2004 07:38 Привет всем. Подскажите,как в пассивном режиме, используя XLib, получать от X-сервера сообщения о нажатых клавишах клавиатуры и их коды, не зависимо от фокуса ввода. Заранее спасибо.
Re: XLib programming. Keyboard grab. 30.03.2004 13:03Cobalt Ба, какие знакомые вопросы Улыбка)
Насколько я знаю - это невозможно - на уровне архитектуры (возможно, что я ошибаюсь).
Analysis of the X Protocol for Security Concerns
[www.xfree86.org]
*Theft*
occurs when a client gains access to information _owned_ by another client
without explicit permission from that other client. For this analysis, we
take a broad view of ownership: any information that exists in the server
due to the actions of a client is considered owned by that client.
Further-more,
the client that has input focus owns keyboard events, and the client
that owns the window that the pointer is in owns mouse events. This view
may reveal certain instances of ?theft? that we don?t care to stop, but we
think it is better to identify all potential candidates up front and cull the
list later than to do a partial analysis now and plan on reanalyzing for
remaining holes later.
Re: XLib programming. Keyboard grab. 30.03.2004 15:29Cobalt P.S.
Некоторые утверждают, что в библиотеках - обёртках над XLib (GTK,QT) такое возможно. Но следить можно только за теми прогами, что запущены на том же компе, на котором запущена ваша прога.
Re: XLib programming. Keyboard grab. 06.06.2004 23:24Sloth А как на счет XGrabKey?

The XGrabKey function establishes a passive grab on the keyboard. In the future, the keyboard is actively grabbed (as for XGrabKeyboard), the last-keyboard-grab time is set to the time at which the key was pressed (as transmitted in the KeyPress event), and the KeyPress event is reported if all of the following conditions are true ...
RSS-материал