Jump to content
Flirc Forums

Play/Pause toggle key


MrNice

Recommended Posts

Hi,

 

I didn't find an answer in the forum, so:

 

My remote has only 1 key for play/pause.

Is it possible to assign a toggle key with play/pause (play when in stop/pause and pause when in play) in the Flirc?

In Flirc software all the controlers have 2 separate keys.

If not how do you manage to have play and pause in you remote?

 

Many thanks

Link to comment
Share on other sites

Oops, sorry this is a Flirc forum and I forgot to tell that.

 

I have a Raspberry Pi with Openelec version 3.2.4

In fact the behaviour is what is in this page for SPACE key in column GLOBAL

http://wiki.xbmc.org/index.php?title=Keyboard_controls

playlist / file manager

but not play/pause in column video playback or Music visualisation

 

Thanks

Link to comment
Share on other sites

I use xbmc profile:

When I map Play/Pause ( >/|| ) remote button to Pause key ( || ), usage is; swap between folder with files list (.. at the top) and play list.

When I map Play/Pause ( >/|| ) remote button to Play key ( > ), usage is; start to play at the beginning and start to play at the beginning (again).

Not so easy.

 

So what I can do?

Link to comment
Share on other sites

It's that easy.

 

That was not as an offense meant ;)

 

That's a really strange behaviour!

I'm using nearly the similar configuration (RasPi Rev. B, OpenELEC 3.2.4 installed via Noobs, with ATV silver remote) and have no such trouble with it.

The ATV remote have a combined play/pause button and after mapping via xbmc profile in gui, it exactly do what i want...

I press play to play and again for pause and so on!??

 

What remote are you using?

Have you changed any settings in the keyboard.xml from xbmc?

Are your localization settings in xbmc and openelec correct?

Changed any settings in xbmc->system->input devices? Try to set here "remote sends keyboard presses" and map play/pause again.

 

Try to clear the config from the flirc device and map it from scratch.

Link to comment
Share on other sites

That was not as an offense meant ;)

I didn't, just I was thinking that I never win lotto but I get a lot of computer issues.

(At this time I use Linux Mint-Mate, when I click Places>Home Folder, it open VLC and play music from another HDD... and more issues)

 

Back to the point:

I use Denon RC-1167 from my AVR-2313

Good pic here: http://www.amazon.com/Denon-Rc-1167-Remote-Control-Rc1167/dp/images/B00BA08UB0

I didn't change keyboard.xml, even don't know where it is.

Localisation OE and XBMC are done.

I changed the "remote sends keyboard presses", nothing better

 

I erased all the Flirc then recorded with xbmc profile:

Play button with 4 different keys

Pause button with 1 other key

Still the same on all buttons

 

BTW, no keyboard connected to Pi only mouse.

Link to comment
Share on other sites

More suggestions:

Try a different remote for testing purposes?

Also disconnect the mouse from pi, before booting up and see, if the remote works properly then.

Next could be to reinstall the gui including the drivers, clear up the flirc and map it from scratch.

Hm... running out of ideas :(

 

Again, i'm using a pi with OE also without any trouble. I've tested the flirc device with almost any remote, i have in reach with always the same result: it works in the way i want it to.

Link to comment
Share on other sites

I found 2 old remotes saved from bin few years ago.

Both have Play and Pause buttons separately.

Both have the same behaviour;

- Play with the first press Play button and play again from beginning with the second press.

- Toggle file view/play list with Pause button

- Stop paying with Stop button

When a button is recorded with the xbmc profile then we con go to the keyboard profile and press recorded remote buttons, then key turn green according to the remote button pressed.

So Play button sends p key

Pause sends space bar

Stop sends x key

 

sudo ./flirc_util keys allows to check that as well. ($ sudo ./flirc_util settings as well)

Could you run it and post please?

 

I don't have a USB keyboard to compare when press p or space bar.

 

BTW:

I just note that my request in the other thread "

Keyboard key (action) mapped to more than 1 remote key"

is implemented. If you have more than 1 remote or 1 remote with more than 1 profile, you don't need to delete the previous record for one button to record a new button code to the same key (action). Not easy to explain.

For example, you record Play button from the remote 1 with the xbmx profile, > is green. You can record the Play button from the remote 2 with the xbmc profile, > will be green as well.

Look at the CLI command:

$ sudo ./flirc_util keys

Recorded Keys:
Index  hash        key
-----  ---------   ---
    1  9D6C74B0    tab
    2  5F5A4B9D    home
    3  5B1B6912    escape
    4  5B06EC4E    x
    5  9DC159A3    c
    6  5B68E519    up
    7  1917DA7B    left
    8  99BE5F32    right
    9  5729038F    down
   10  5BAC361F    return
   11  99298E70    backspace
   12  5F7C2097    ,
   13  5F386CE9    .
   14  9D7D089E    pageup
   15  9D7D6728    pagedown
   16  1D89F0E4    i
   17  5BF9F14B    /
   18  5FF41AE4    p
   19  8096252F    p
   20  862411    space
   21  6104EE71    p
   22  61C0603E    space
   23  61040FBF    x
 

I have 3 p keys, 2 space and 2 x. This is what I was saying in the other thread.

Link to comment
Share on other sites

Here's the dump:

 

C:\Program Files\Flirc>flirc_util.exe settings
Settings:
  sleep detection:  Disabled
  noise canceler:   Disabled
  inter-key delay:  6
  state:            0
  builtin profiles: Enable

Memory Info:
  keys recorded:  12
  keys remaining: 157
  memory used:    8%

Recorded Keys:
  hash        key
  ---------   ---
  ABC7EB35     up
  AF59123E     return
  2B0FF107     down
  A780FB37     left
  2B60DEDC     right
  A7D1E80C     backspace
  2F8187A6     p
  65C2A0DE     c
  654ADE1F     i
  65064FBF     y
  65C2FB0C     o
  654A85CF     t

 

Hardware: RPi Rev. B, 8gb Sony UHC I SD, Flirc fw 2.2 (gui 1.6), ATV-Remote silver

Software: XBMC via OpenELEC 3.2.4 (latest stable) installed via Noobs

 

I've mapped the seven ATVR buttons with the xbmc profile in the gui using:

up, left, right, down, play, back, enter

I've also mapped my LG-TV remote with some special keys using the general keyboard layout:

c (context menu), i (info), z (zoom), o (codec info), t (toggle subs on/off)

 

The ATV remote offers a combined play/pause button.

I've mapped the play button in the xbmc profile and it works as wanted.

It toggles play and pause.

 

Bit afraid to ask, but did you try to map the play button only (without binding the additional pause button)?

 

Interesting fact: mapped is "y" for "z" due to the us key-layout in the gui, but the "y" corresponds to "z" due to my german keyboard layout.

So flirc recogs the key as "y" but sends a "z"... weird!

 

This is my actual config, and it works like charm. No additional hardware plugged into the rpi.

No special settings in xbmc and/or OE, no modified xml's or anything else.

OE runs out of the box, only using a different skin (confluence mod v.2).

This config also works under Raspbmc using an additional sd card with same conditions.

Link to comment
Share on other sites

Bit afraid to ask, but did you try to map the play button only (without binding the additional pause button)?

 

In fact it's not possible to map the same remote button (same IR code) to 2 keys.

I always mapped Play (or space bar) only to 1 key but when I press first time it plays and the second time it should pause. It doesn't for me but do for you.

I understand now that Flirc send only p to XBMC every time the button is pressed and XBMC interpret it depending of what he is doing. If it plays it will pause and if it is on pause it will play.

When I map space bar it never Play/Pause but always change display file list/play list.

 

IMO, this is not a Flirc issue but a XBMC interpretation.

The differences between our configs are: I didn't use Noobs to install, I run Linux on my computer and the Flirc version.

 

$ sudo ./flirc_util version

Flirc Version v1.2.2 [v1.2.2]

   2.3 01-25-2014 [0x3DB4D4F3]

 

I'll give up for that now as I don't know how to fix it.

 

Side question: Did you try to map the \ key (Toggle windowed mode)?

http://wiki.xbmc.org/index.php?title=Keyboard_controls

I added a bug in the section

Link to comment
Share on other sites

I understand now that Flirc send only p to XBMC every time the button is pressed and XBMC interpret it depending of what he is doing. If it plays it will pause and if it is on pause it will play.

And it also initiates play, space do not, it only reacts as pause/play (depends on xbmc condition).

 

So under the line, mapping "p" or play (out of the xbmc profile in gui) will not working for you as intended (toggle play/pause)!?

Link to comment
Share on other sites

 

So under the line, mapping "p" or play (out of the xbmc profile in gui) will not working for you as intended (toggle play/pause)!?

Exactly.

But I was wondering; You said it's working for you, could you tell me in which window you are when you press > ?

Please a thorough description.

 

Link to comment
Share on other sites

You mean xbmc, i guess?

 

Notice: For movies, i do not use the database mode (films) for launching movies, i go to video->files.

 

The following is always the same for movies (videos), tv shows and music.

 

- In the main menu i navigate to (video, tv shows or music) and press enter

- i navigate through the folders to the desired file (movie, episode or song)

- then i press play/pause to start the file (movie, episode, song)

- while the file is running, i can toggle play/pause as much, as i want

 

Mapping was, as described.

Link to comment
Share on other sites

I've just checked it twice and have to admit, that it works exactly as i said EXCEPT music!

By pressing the play/pause button in music, it is the behaviour you've described.

You press play once, the track will start and press play again (awaiting pause) and it will skip back and start same track again.

So your doubt was justified.

Pause/Spacebar was not tested, but i guess it will be a similar result.

But this is def a xbmc related issue and should be fixed by modifying the keyboard.xml

I will see, if i find something about that at the weekend.

 

Edit: Found this on first quick view ;)

Edited by Nobuddy0816
Link to comment
Share on other sites

Almost perfect,

 

I created keyboard.xml with the code from the above link.

 

Play/Pause button is working well only when the file is already playing. I have to start playing the file with enter button (middle of arrows) first then the Play/Pause works fine.

 

I change the action from pause to playpause but still the same. This should be the good one.

See names and actions here and here

Any idea?

Link to comment
Share on other sites

Glad to hear that all is working now for you!

 

I use the "p" key as play key instead of enter.

Enter will start playback only at the end of the menu-tree, while "p" starts playback much earlier.

Also enter will bring you the osd during playback is running, while "p" toggles play/pause (except music, as we examined).

 

All the best for you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...