Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Navigation using remote control
#9
Photo 
Hello Forum,

Here is a complete triggerhappy configuration for this OSMC Remote Control to control moOde during playback.
  • Home: replace the current playlist with the default playlist and start playing
  • Info: toggle coverview
  • Left,Right: seek 20 seconds backward/forward
  • Up,Down: previous/next entry on playlist (subject to random)
  • OK: toggle random mode
  • Back: drop everything except the currently playing item
  • List: shuffle the current playlist
  • Play/Pause: toggles between play and pause
  • Stop: Stop!
  • VolDown: Lower volume by one unit, mute on long press
  • VolUP: Increase volume by one unit, restore volume on long press
Note: coverview toggle is only applicable to the local display.

In the hope that this is useful to someone else ...

Code:
# Simple moOde remote control configuration for the OSMC USB controller
#

# Volume keys: move 1 unit on short press, mute/restore on long press
## Deprecated as of moOde 9.3.3
##KEY_MINUS 1 /var/www/util/vol.sh -dn 1
##KEY_MINUS 2 /var/www/util/vol.sh -mute
##KEY_EQUAL 1 /var/www/util/vol.sh -up 1
##KEY_EQUAL 2 /var/www/util/vol.sh -restore
KEY_MINUS 1 curl http://moode/command/?cmd=set_volume%20-dn%201
KEY_MINUS 2 curl http://moode/command/?cmd=set_volume%20-mute
KEY_EQUAL 1 curl http://moode/command/?cmd=set_volume%20-up%201
KEY_EQUAL 2 curl http://moode/command/?cmd=set_volume%20-restore

# Play/Pause: ignore duration, act on key release
KEY_PLAYPAUSE 0 /usr/bin/mpc toggle
KEY_STOP 0 /usr/bin/mpc stop

# Crop / Shuffle: ignore duration, act on key release
KEY_BACK 0 /usr/bin/mpc crop
KEY_C 0 /usr/bin/mpc shuffle

# Navigation: [-+]20s/previous/next entry on key release
KEY_LEFT  0 /usr/bin/mpc seek -00:00:20
KEY_RIGHT 0 /usr/bin/mpc seek +00:00:20
KEY_DOWN  0 /usr/bin/mpc prev
KEY_UP    0 /usr/bin/mpc next

# OK: toggle random mode on key release
KEY_ENTER 0 /usr/bin/mpc random

# Home: restart the default playlist on key release
KEY_ESC 0 /usr/bin/mpc clear; /usr/bin/mpc load 'Default Playlist'; /usr/bin/mpc play

# info: toggle coverview on short/long key press
KEY_I 1 curl http://moode/command/?cmd=set_coverview%20-on
KEY_I 2 curl http://moode/command/?cmd=set_coverview%20-off
Reply


Messages In This Thread
Navigation using remote control - by scaronpce - 05-07-2025, 02:31 PM
RE: Navigation using remote control - by dheijl - 05-07-2025, 06:37 PM
RE: Navigation using remote control - by scaronpce - 05-12-2025, 01:50 PM

Forum Jump: