Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1

    How to get Jivelite to understand new keys?

    Hello,

    I have been using picoreplayer a while now successfully and want to extend one of the players with a bluetooth remote control. I have one which has exactly media control 5 buttons. Perfect for a media player

    So what I did was to add a small pico bluetooth receiver to the Raspberry Pi and connecting the remote using the standard bluetooth commands. It all works like charm and I can also add the bluetooth directory structure to the backup so that they last a reboot.

    Important to know is that I still want the solution to be headless (no screen) but I understood that using jivelite should still be a simple solution to get a remote added in picoreplayer.

    When I use "evtest" to log the commands received I get these events (the one's in parentheses are when holding the button):

    KEY_VOLUMEUP

    KEY_NEXTSONG KEY_PLAYPAUSE KEY_PREVIOUSSONG
    (KEY_MENU) (KEY_HOMEPAGE) (KEY_POWER)

    KEY_VOLUMEDOWN

    So I now copied the InputToActionMap.lua to /home/tc/.jivelite/userpath/jive and can now see it get used instead.

    Though when I add the new keys above:

    keyActionMappings.press = {
    [KEY_HOME] = "go_home_or_now_playing",
    [KEY_PLAY] = "play",
    [KEY_ADD] = "add",
    [KEY_PREVIOUSSONG] = "back",

    I get an error in the log:

    Jive: ...home/tc/.jivelite/userpath/jive/InputToActionMap.lua:103: table index is nil
    stack traceback:
    ...home/tc/.jivelite/userpath/jive/InputToActionMap.lua:103: in main chunk
    [C]: in function 'require'
    /opt/jivelite/share/jive/jive/JiveMain.lua:47: in main chunk

    This points to that KEY_PREVIOUSSONG isn't defined. (which is in line 103)

    What is the right way to get these new keys accessible?

    Any clue on this?

    Cheers

    Richard

  2. #2
    Hello,

    is there any forum available for jivelite? Or do I need to post this question somewhere else?

    Thanks

    Richard

  3. #3
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,468
    You need to recompile jivelite after adding a new key definition to jive_framework.c and jive.h. You also need to update InputToActionMap.lua and JiveMain.lua with the new key map.

    Also depending the the key you're trying to use, the SDL library may need to be modified for either the fbcon and/or X11 event handlers.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  4. #4
    Quote Originally Posted by ralphy View Post
    You need to recompile jivelite after adding a new key definition to jive_framework.c and jive.h. You also need to update InputToActionMap.lua and JiveMain.lua with the new key map.

    Also depending the the key you're trying to use, the SDL library may need to be modified for either the fbcon and/or X11 event handlers.
    Thanks, will have a try!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •