Feature Request: spacebar also toggles play/pause #228

Closed
ireuben opened this Issue Mar 2, 2012 · 13 comments

Comments

Projects
None yet
3 participants

ireuben commented Mar 2, 2012

Pianobar is incredibly cool (no more Flash on my machine!), but one request: could you map the spacebar to do the same thing as the "p" key: toggle the play/pause? Using space for that is pretty common convention as it's a nice big target to hit when you want to stop music playing.

Thanks for all the hard work!

Owner

PromyLOPh commented Mar 3, 2012

Mapping space to pause with the act_songpause config setting is not an
option?

ireuben commented Mar 3, 2012

Ah cool, I didn't realize I could do that. Works for me. =)

ireuben closed this Mar 3, 2012

has207 commented Jun 20, 2012

This used to work by simply leaving an extra space after the = sign in the confg file. As of last release that no longer works, and I tried quoting the space and escaping it in various ways. Is this broken or is there some way to do it stil? Really miss this feature..

ireuben reopened this Jun 20, 2012

Owner

PromyLOPh commented Jun 20, 2012

As far as I see it still works with two spaces (one after the = is
mandatory and the other one is the actual keybinding).

ireuben commented Jun 20, 2012

Not working for me either using the 2012.05.06 version. The same config (with two spaces after the equal sign) was working prior to that.

Owner

PromyLOPh commented Jun 20, 2012

Ah, wait. Now I remember fixing a bug related to act_* in
8d65ce2 (issue #275). Can you try the
latest git HEAD?

has207 commented Jun 20, 2012

I synced and rebuilt from HEAD, pause still doesn't work with space. I have "act_songpause = " (two spaces after the equal) in the config file

has207 commented Jun 20, 2012

Any chance of just making this the default key binding? Space means "pause" in pretty every player I've ever used, command line or graphical, it seems like a no-brainer default.

Owner

PromyLOPh commented Jun 22, 2012

I won’t change the defaults unless absolutely necessary. works
fine for me. Make sure you really have two spaces after “act_songpause
=” and the line is terminated by \n.

has207 commented Jun 22, 2012

Weird, I recompiled again and now it works.

FWIW, I don't think you have to change the default "p" mapping, just adding "space" as an alternative would do the trick -- it doesn't seem to be used for anything anyway.

Owner

PromyLOPh commented Jun 24, 2012

I see. We could do something like this[1]. Pro: A few lines. Con: Adds
another config setting (act_playpause2).

[1] https://gist.github.com/2982823

has207 commented Jun 24, 2012

My first thought was "ew, a second config setting", but I guess it would let people map multiple keys to play/pause which might actually be beneficial in its own right, and not having to monkey with the config to get space to work (took me awhile to stumble on the two-space solution originally) is a big win IMO.

Consider this a vote for including the gist :)

@PromyLOPh PromyLOPh added a commit that referenced this issue Jun 26, 2012

@PromyLOPh PromyLOPh Additional pause keybinding
Allowing multiple keys per command would be nice, but this works for
now. See #228.
e95baab
Owner

PromyLOPh commented Jun 26, 2012

Applied. Note to myself: Keybinding subsystem needs a rewrite ;)

PromyLOPh closed this Jul 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment