Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - jdykstra

1
Customization / Faster remote control through LIRC
September 29, 2010, 00:27:39
There are several ways to connect gmusicbrowser to the Linux infra-red control software (LIRC).  One method, which uses the irexec command, is described elsewhere in this forum.  It requires that a new process be started for each remote control button push, and can have response time limitations and is racy when more than one button is quickly pushed in succession.

Another method, which uses the irxevent command, does not have these problems.  Instead of feeding commands to gmusicbrowser through its command-line options, this method sends simulated keypresses directly to the application.

See http://www.lirc.org/ for documentation on LIRC, the .lircrc file format, and irxevent.

Here's a sample .lircrc file that implements basic control buttons:


begin
   prog = irxevent
   button = KEY_PLAYPAUSE
   config = Key ctrl-g CurrentWindow
end

begin
   prog = irxevent
   button = KEY_NEXT
   config = Key ctrl-x CurrentWindow
end

begin
        prog = irxevent
        button = KEY_PREVIOUS
        config = Key ctrl-z CurrentWindow
end

begin
prog = irxevent
button = KEY_STOP
config = Key ctrl-b CurrentWindow
end


This is the KeyBindings line that I added to my layout to translate the keypresses generated irxevent into gmusicbrowser commands:


KeyBindings     = c-g PlayPause c-b Stop c-x NextSong c-z PrevSong c-r Rewind(999999)


2
Customization / Re: Keybindings not working in 1.0.2?
September 10, 2010, 13:54:26
Thanks for the fast replies, and thanks for an incredibly useful and flexible music player.  I really appreciate all of the work that's gone into gmusicbrowser.
3
Customization / Re: Keybindings not working in 1.0.2?
September 09, 2010, 22:46:47
Thanks for the fast reply!

Quote from: Quentin Sculo on September 09, 2010, 22:13:21
- the syntax used in the layouts for the keybinding is "c-n" (c for ctrl, a for alt, w for windows key)

Ah.  Someone might want to update the layout documentation, which says "Key names are as shown in the key binding tab in the settings dialog." 

Quote from: Quentin Sculo on September 09, 2010, 22:13:21
The keybindings only work if there are not used first by the widget that has the focus, it's particularly a problem for keys without modifiers (crtl, alt, win).
But even those with modifiers are sometimes affected, I just noticed that ctrl-n is used in gtk treeviews (used in SongList) to move the row cursor down, so that might explain why it didn't work for you.
I don't know if I should do something about this ctrl-n (and ctrl-p), maybe a way to disable them ? They are not implemented in SongTree btw.
Other keybindings used in SongList/SongTree : ctrl-f, ctrl-g, ctrl-a

You're getting these from the code?  I couldn't find any other way to determine which keybindings were already present.

Quote from: Quentin Sculo on September 09, 2010, 22:13:21
A precision, these shortcuts only work if a gmb layout window has the focus. For global keybindings, see the FAQ.

What's a gmb layout window?  I'm afraid I don't know GNOME.

Thanks for the help!
4
Customization / Keybindings not working in 1.0.2?
September 09, 2010, 21:29:46
I'm using gmusicbrowser on Ubuntu Lucid, and I've had no luck getting keybindings to work.  Is this a known problem?

I've tried adding keybindings via the settings window, and by adding the KeyBindings property to the layout I'm using.  In both cases, I see no response to hitting the configured key.

A couple of layouts included with the package use escape as a keybinding to close the window.  I've tried modifying one of them to look for a different key, and once I do, escape no longer closes the window, but neither does my newly-configured key. 

Here's the test property I added to my own layout:

Keybindings   = Ctrl-n EnqueueSelected

(I know that Ctrl-q will do the EnqueueSelected action--I was just using this as a test.)

What am I doing wrong?