Re: GUI-less app to capture key_press_events only




On Oct 5, 2004, at 11:22 AM, Eric Lenio wrote:

Actually the issue is related to the Curses.pm module: the problem is that Curses does NOT trigger an event by pressing the control (or shift or mod) key by itself. I fumbled my way through building a very simple Gtk2 app which did recognize the event. But that little test app had a Gtk window, and I want to
get away from having any window.

X applications cannot receive events unless they have an X window, because it is the X window that receives the event. the gtk+ equivalent is a GdkWindow (the GdkWindow is an abstraction for a windowing system's lowlevel window object, and is an X window in the X11 target). getting keyboard events also requires keyboard focus, so using a hidden window will be tricky magic at best.

so, if you're wanting to capture the Ctrl key in a terminal app, Gtk2 will not help you at all.

--
Walk softly, and carry a BFG-9000.
  -- unknown




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]