How to configure button options on the Astrion-remote

Hi, I was wondering how to program options like LONG_PRESS of the centre button to access secondary menu’s etc.

I have various remotes that have different options and naming conventions for key_codes but there are some that seem to be similar across the board like to bring up a secondary menu or options menu you long press the select button or configure another button to achieve the desired result.

Unfortunately I have had no success in configuring such options on the Astrion remote and is a heavily used feature within kodi and other apps used by most, has anyone come across this and have a fix or solution to this?

I have a few other similar issues so a full mapping of key_codes for some of the more common manufacturers would be great.

Thx

AJ

Hi @MrJ, welcome to the community — thanks for your detailed question! :+1:

You’re asking about configuring secondary actions, like LONG_PRESS on the center/select button, which is a very common requirement for apps like Kodi or other media players that support long-press or secondary menus. Here’s a breakdown of what you can do with the current Astrion setup:


:one: Current RosCard Button Options

In RosCard v1.1.1, you can:

  • Bind a button to a Home Assistant entity (media_player, remote, script, scene, input_select, etc.)

  • Choose a script or service as the action

  • Assign short press actions to buttons

Currently, long-press actions (like triggering a secondary menu) are not fully supported natively for all buttons. The system primarily recognizes short press triggers at this stage.


:two: Workarounds for Long-Press

There are a few ways to achieve long-press-like behavior today:

Option A – Use Home Assistant Scripts or Automations

  • Create a script that mimics a long-press action by sending the appropriate key command multiple times or triggering the secondary menu in your app.

  • Bind that script to a custom button in RosCard.

  • Example: You could create a button called Select_LongPress and map it to your Kodi long-press action.

Option B – Use Input Select or Template Dispatcher

  • Similar to how @peteS-UK handled multiple remote commands, you can use a template select entity to select actions like short_press / long_press / menu etc.

  • The RosCard button triggers the select option, and Home Assistant automations execute the corresponding key codes.

Option C – Use Multi-Button Scripts

  • Combine multiple key commands in a single script to emulate long presses (for example, hold a key for 500ms, then send another key).

  • This can be useful for apps that respond to key down / key up events.


:three: Key Code Mapping

You’re right that different devices use slightly different key_codes. Currently, Astrion does not ship with a full key_code database for all Android TV devices, Kodi, or other platforms.

Some suggestions:

  • For Kodi, the most common key_codes are: SELECT, BACK, UP, DOWN, LEFT, RIGHT, MENU, INFO, PLAY, PAUSE.

  • For Android TV / Shield, many codes follow the standard DPAD / Media key convention.

  • Using Home Assistant Developer Tools → Services with remote.send_command is the best way to test key_codes before binding them to RosCard buttons.

We are considering providing a common key_code mapping guide in future firmware releases, which should make configuration much easier.


:four: Future Plans

  • Full support for long-press actions on physical and custom buttons.

  • Ability to assign secondary scripts or menus to buttons like center/select.

  • A more complete key_code mapping guide for popular devices (Kodi, Android TV, STBs, media players).

This feedback is very valuable and has already been added to our internal roadmap.


Thanks again for raising this — your use case highlights one of the most requested features by advanced users. Once long-press support is added, it should make Astrion much more flexible for apps like Kodi and multi-device setups. :rocket:

1 Like

Thanks Charles that was such a great breakdown, I do look forward to having the feature part of the native operational functions of the remote but will try the suggestions as a practical workaround.

So far the remote has been awesome and by far the best remote I have used for media as well as smart home operations go.

Thanks again..

I don’t know how viable or if it would be acceptable, but have you considered building a roscard for nerwyn’s universal remote card? That already has all the mappings for all the common devices and is widely used - might save re-inventing the wheel….

Yeah good point, It’s well thought out and pretty featureful. I should have suggested leveraging that but I wasn’t sure of the technicalities invloved… but good idea @peteS-UK :+1:

thanks for the feedback and we are glad to know that you like the Astrion Remote, we will try to do more improvements to meet the demanding features for the remote.

@peteS-UK @MrJ yes, we will make enhancement for the RosCards media player control and take reference considerations for all those good structural design such as FireRemote, Nerwyn’s Universal Remote Card and others, thank you for the advices.

1 Like