Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by KevinCodes4Food · Apr 05, 2014 at 01:03 AM · androidremoteinput.getkeyamazon

Mapping Android Media Key Codes To Unity

I am trying to connect one of our Unity games to an Android remote control. The remote is using these Android media keycodes:

[*] Select (D-Pad Center) KEYCODE_DPAD_CENTER

[*] Play/Pause KEYCODE_MEDIA_PLAY_PAUSE

[*] Rewind KEYCODE_MEDIA_REWIND

[*] Fast Forward KEYCODE_MEDIA_FAST_FORWARD

Is a mapping or plug-in available that routes Android media remote input to Unity KeyCodes or a similar interface?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by jhample · Apr 23, 2014 at 06:22 AM

To add to the first answer here are some keycodes for the controller as well

Remote: Up- KeyCode.UpArrow Down- KeyCode.DownArrow Left- KeyCode.LeftArrow Right- KeyCode.DownArrow Center Button- KeyCode.JoystickButton0 Back Button- KeyCode.Escape Menu Button- KeyCode.Menu

Controller: Left stick- X axis- x axis Y axis- y axis Button- Keycode.JoystickButton8 Right stick- X axis- 3rd axis Y axis- 4th axis Button- Keycode.JoystickButton9 Dpad- X axis- 5th axis Y axis- 6th axis A- Keycode.JoystickButton0 B- Keycode.JoystickButton1 X- Keycode.JoystickButton2 Y- Keycode.JoystickButton3 L1- Keycode.JoystickButton4 R1- Keycode.JoystickButton5 L2- 13th axis R2- 12th axis Back Button- KeyCode.Escape Menu Button- KeyCode.Menu

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AndrewRyan · Feb 19, 2017 at 09:26 AM 1
Share

Thanks but christ is that hard to read.

 Remote: 
 Up- $$anonymous$$eyCode.UpArrow 
 Down- $$anonymous$$eyCode.DownArrow 
 Left- $$anonymous$$eyCode.LeftArrow 
 Right- $$anonymous$$eyCode.DownArrow 
 Center Button- $$anonymous$$eyCode.JoystickButton0 
 Back Button- $$anonymous$$eyCode.Escape 
 $$anonymous$$enu Button- $$anonymous$$eyCode.$$anonymous$$enu
 
 Controller: 
 Left stick- (X axis = x axis) (Y axis = y axis) 
 L3 Button- $$anonymous$$eycode.JoystickButton8
 Right stick- (X axis = 3rd axis) (Y axis = 4th axis) 
 R3 Button- $$anonymous$$eycode.JoystickButton9 
 Dpad- (X axis = 5th axis) (Y axis = 6th axis) 
 A- $$anonymous$$eycode.JoystickButton0 
 B- $$anonymous$$eycode.JoystickButton1 
 X- $$anonymous$$eycode.JoystickButton2 
 Y- $$anonymous$$eycode.JoystickButton3 
 L1- $$anonymous$$eycode.JoystickButton4 
 R1- $$anonymous$$eycode.JoystickButton5 
 L2- 13th axis 
 R2- 12th axis 
 Back Button- $$anonymous$$eyCode.Escape 
 $$anonymous$$enu Button- $$anonymous$$eyCode.$$anonymous$$enu

avatar image
1

Answer by KevinCodes4Food · Apr 07, 2014 at 11:05 PM

I received this from Amazon technical support:

At the moment our FireTV Remote has the following mappings in Unity3D:

FireTV Button Unity KeyCode

Up Arrow KeyCode.UpArrow

Down Arrow KeyCode.DownArrow

Left Arrow KeyCode.LeftArrow

Right Arrow KeyCode.DownArrow

Center Button KeyCode.JoystickButton0

Back button KeyCode.Escape

Menu Button KeyCode.Menu

The following buttons are not mapped in Unity and would need a plugin developed to accept input:

Play/Pause

Rewind

Fast Forward

The following are system-wide buttons and would not be mapped in 3rd party applications:

Microphone

Home

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

All calls to Resources.Load stopped working on Amazon devices (Unity 5.6.3p3) 1 Answer

Setting up HTC One S for Unity Remote 1 Answer

Problem with Unity Remote for Android 2 Answers

Remote Gui Button only works on device if mouse is over the button in Unity editor 0 Answers

Unity Remote stopped working Android 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges