Why XGrabKey generates extra focus-out and focus-in events?

后端 未结 7 2076
时光说笑
时光说笑 2020-12-14 00:33

Does anyone know an xlib function to trap a keypress event without losing the original focus? How to get rid of it?

(or \"to use XGrabKey() without generating Grab-s

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 01:00

    For writing a key (shortcut) mapping software also have a look at libtermkey, a terminal key input library (written in C) that recognises XTerm-style mouse position/button reporting, special keys (such as arrow and function keys), including "modified" keys like Ctrl-Left.

    There is, for example, POE::Wheel::TermKey, "an asynchronous perl wrapper around the libtermkey library, which provides an abstract way to read keypress events in terminal-based programs."

提交回复
热议问题