Re: [Rhythmbox-devel] global keyboard shortcuts / HIG over bluetooth remote control



Just a further note on this.

I too have a multimedia keyboard.  The keys work fine for Rhythmbox.
Totem does not repsond to them when RB is running, regardless of which
is opened first.

JDuggan

On 7/13/06, Bastien Nocera <hadess hadess net> wrote:
On Thu, 2006-07-13 at 13:27 +1000, James "Doc" Livingston wrote:
> On Tue, 2006-07-11 at 18:09 +0100, Peter wrote:
> > I could make one for Rhythmbox - but it looks like it would be much
> > easier to use if Rhythmbox supported global keyboard shortcuts
> > (otherwise the remote control would only work if rhythmbox was the
> > active window).
> >
> > Is global keyboard shortcuts something you have planned?  Possibly as a
> > plugin?  (I did search, but didn't see a bug for global keyboard shortcuts).
>
> We already support X's "media" keys, XF86MediaNext and the like. If your
> keyboard settings are set up correctly, you should be able to press the
> "next" and "previous" keys on your keyboard (assuming of course you have
> a keyboard with them) and control RB.
>
> To me it would make much more sense to synthesise those key events.

The only problem being that you cannot synthesis a key event if the
Keysym doesn't exist in the keymap. The XTest bits only support sending
keycodes, so you need to make sure this keycode maps to the keysym
you're interested in.

There's a function in ATK (iirc) that generates key events with a
special keysym, but it does exactly what you would expect it to:
- bind "empty" keycode to keysym
- generate event with keycode
- cross fingers and hope the piece of crap doesn't race

> > Incidentally, I think it would be great to use the same global keyboard
> > shortcuts as Amarok - e.g. WIN+B for next track.
>
> How does it interact with other global keyboard shortcuts (e.g. I have a
> number of things from Gnome's "Keyboard Shortcuts" preferences tool set
> to Win-<key>).
>
> Also, setting global keyboard shortcuts probably gets nasty if several
> apps want to do it. Particularly if they are running at once, e.g. if
> Totem did it as well as your music player.

This is a discussion that started a long time ago. Totem only gets the
event when it's focused, people say it's not useful. Rhythmbox grabs it
for the whole desktop. What happens if Rhythmbox is started first and
Totem can't grab it? What happens when Totem is focused and Rhythmbox
running?

I think it might be useful to setup a small D-Bus API for use by media
players, and have the gnome-settings-daemon generate those events,
rather than rely (solely) on the multimedia keys.

1. List the actions that keyboard keys allow (play/pause, next,
previous, etc.) that require special handling
2. Setup an API in a couple of players that would allow those actions
through D-Bus
3. Modify gnome-settings-daemon to generate those calls when the
specificed key (and the proper key) is pressed
4. (this is the tricky bit) think of a way of selecting which media
player gets the events in a non-obtrusive way (tray icon in case of
conflict?)

Comments?

--
Bastien Nocera <hadess hadess net>
"I want no epitaphs of profound history and all that type of thing. I
contributed. I would hope they would say that, and I would hope somebody
liked me." - Brian Clough, on being remembered.

_______________________________________________
rhythmbox-devel mailing list
rhythmbox-devel gnome org
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel




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