I’m trying to detect button presses for the Amazon Fire TV for the Rewind and Forward wind buttons of the TV remote.
It turns out that the Play/Pause button is well mapped in MonoGame to Keys.MediaPlayPause
However the Rewind and Forward wind buttons are not mapped to anything?
Using ILSpy I’m seeing that in Android code
public enum Keycode ... /// <summary> /// <para tool="javadoc-to-mdoc">Key code constant: Fast Forward media key. </para> /// </summary> [IntDefinition(null, JniField = "android/view/KeyEvent.KEYCODE_MEDIA_FAST_FORWARD")] MediaFastForward = 90, /// <summary> /// <para tool="javadoc-to-mdoc">Key code constant: Play Next media key. </para> /// </summary> [IntDefinition(null, JniField = "android/view/KeyEvent.KEYCODE_MEDIA_NEXT")] MediaNext = 87,
And then in MonoGame code
// Microsoft.Xna.Framework.Input.Keyboard .. dictionary[Keycode.MediaPlayPause] = Keys.MediaPlayPause; dictionary[Keycode.MediaStop] = Keys.MediaStop; dictionary[Keycode.MediaNext] = Keys.MediaNextTrack; dictionary[Keycode.MediaPrevious] = Keys.MediaPreviousTrack;
So it looks like there is a key that Android call
(and another for rewind) that are not mapped to any Key in MonoGame, (although KeyEvent.KEYCODE_MEDIA_NEXT is)?
So my question is;
Ideally, is there a way I can detect for these button presses in MonoGame?
or failing that, is there a way to use standard Mono and C# to detect it via the Activity1 class or whatever?