Login-session-wide accelerators?

View: New views
4 Messages — Rating Filter:   Alert me  

Login-session-wide accelerators?

by Fatman_UK :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Thanks,
Adam J Richardson

Re: Login-session-wide accelerators?

by Fatman_UK :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fatman_UK 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.

Thanks,
Adam J Richardson
Sorry for the bump, but I haven't had any replies at all on this. Someone? Anyone?

Regards,
Adam J Richardson

Re: Login-session-wide accelerators?

by Галымжан Кожаев :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You need something like Global hotkeys as I understand. Maybe this
link will help you
http://www.mail-archive.com/gtkmm-list@.../msg03688.html.

2009/11/16, Fatman_UK <fatman@...>:

>
>
> Fatman_UK 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.
>>
>> Thanks,
>> Adam J Richardson
>>
>
> Sorry for the bump, but I haven't had any replies at all on this. Someone?
> Anyone?
>
> Regards,
> Adam J Richardson
>
> --
> View this message in context:
> http://old.nabble.com/Login-session-wide-accelerators--tp25955854p26368930.html
> Sent from the Gtkmm mailing list archive at Nabble.com.
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list@...
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Login-session-wide accelerators?

by Paul Davis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 19, 2009 at 7:39 AM, Fatman_UK <fatman@...> 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.
_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list