Re: Login-session-wide accelerators?



On Mon, Oct 19, 2009 at 7:39 AM, Fatman_UK <fatman crackmonkey us> wrote:
>
> Hi all! Gtkmm newbie here.
>
> Apologies if this has been posted already. Searched but didn't find it. I
> looked at AccelMaps in the online Doxygen pages, but got confused.
>
> My program starts at login and runs in the background. There is a hidden
> window. When the user presses a (configurable) hotkey combo - for instance,
> Super+W - the window shows itself.
>
> That's the plan, anyway. I can't figure out how to assign a hotkey that
> works regardless of which window has focus (including the desktop).
>
> Can someone point me to some relevant docs? I did think of assigning a
> hotkey in [name of window manager], but I want this to be crossplatform so
> ideally I'd like to do it in Gtkmm.

there is really no straightforward way to do this. gtkmm and gtk
primarily concern themselves with the needs of normal GUI
applications, and at least under X Window, the concept of getting
notified of *all* key events, whether they occured while your window
had key focus (let alone being unmapped) instantly puts it into
"non-normal GUI applications". obviously, it is possible to do this -
window managers do it. and obviously it is possible to do this in the
context of gtk/gtkmm, since the metacity WM was written using GTK.
however, i believe its not possible to do with just GTK calls - i
believe you need some interaction with the underlying windowing system
(X, Aqua, win32's GDI or whatever). and clearly you need to plan for
the situation that your desires are overridden by the "real" WM or
some other similar application that wants to look at, and potentially
handle, the same key events as you.


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