I guess I know my answer. 
You can use Corona’s “key” event’s “keyName” string property to identify what was pressed. The key names do actually match what is pressed on an Amazon Fire gamepad. So, you’ll get the following…
A button keyName: “buttonA”
B button keyName: “buttonB”
X button keyName: “buttonX”
Y button keyName: “buttonY”
L1 left shoulder button keyName: “leftShoulderButton1”
R1 right shoulder button keyName: “rightShoulderButton1”
Left stick button keyName: “leftJoystickButton” (This is when you click down on the analogue stick.)
Right stick button keyName: “rightJoystickButton” (This is when you click down on the analogue stick.)
Menu button keyName: “menu”
Back button keyName: “back”
Play/Pause button keyName: “mediaPlayPause”
Rewind button keyName: “mediaRewind”
Fast forward button keyName: “mediaFastForward”
Dpad up/down/left/right keyNames: “up”, “down”, “left”, “right” respectively
If you are after the native key codes, then what you can do is look up which Android Java constants are assigned to which buttons in Amazon’s documentation here…
…and then cross-reference them in Google’s documentation via the link below to see what unique integer ID is assigned to each constant, such as their KEYCODE_BUTTON_A constant.
http://developer.android.com/reference/android/view/KeyEvent.html
Or another solution is to just print() the native key code for yourself view what the actually ID is via “adb logcat”.
I hope this helps!
Awesome! I was interested in the event.keyName strings. I didn’t think it was that simple, and since I currently do not have a joystick to test (yet), I wanted/needed something in order to start getting my app ready for Amazon TV.
Thanks Josh! This helps a lot.
Happy to help. And just to give you some forewarning, end-users can connect non-Amazon gamepads to the Fire TV… such as a PS3 or Ouya gamepad. An Android device will actually accept any bluetooth device that supports the HID protocol. This includes bluetooth mice and keyboards as well. So, you might want to consider setting up a key/button mapping screen in your app as well, like how many PC games do it. I’m sure Amazon’s reviewers would be fine with your app only supporting their gamepads, but the ability to support other gamepads too would add extra polish that I’m sure your customers would like.
Good to know! I have PS3 and PS4 controllers, so I can give it a try.
Dredging up an old topic…
Is there a list of key codes for the Fire TV joystick available somewhere?
I guess I know my answer. 
You can use Corona’s “key” event’s “keyName” string property to identify what was pressed. The key names do actually match what is pressed on an Amazon Fire gamepad. So, you’ll get the following…
A button keyName: “buttonA”
B button keyName: “buttonB”
X button keyName: “buttonX”
Y button keyName: “buttonY”
L1 left shoulder button keyName: “leftShoulderButton1”
R1 right shoulder button keyName: “rightShoulderButton1”
Left stick button keyName: “leftJoystickButton” (This is when you click down on the analogue stick.)
Right stick button keyName: “rightJoystickButton” (This is when you click down on the analogue stick.)
Menu button keyName: “menu”
Back button keyName: “back”
Play/Pause button keyName: “mediaPlayPause”
Rewind button keyName: “mediaRewind”
Fast forward button keyName: “mediaFastForward”
Dpad up/down/left/right keyNames: “up”, “down”, “left”, “right” respectively
If you are after the native key codes, then what you can do is look up which Android Java constants are assigned to which buttons in Amazon’s documentation here…
…and then cross-reference them in Google’s documentation via the link below to see what unique integer ID is assigned to each constant, such as their KEYCODE_BUTTON_A constant.
http://developer.android.com/reference/android/view/KeyEvent.html
Or another solution is to just print() the native key code for yourself view what the actually ID is via “adb logcat”.
I hope this helps!
Awesome! I was interested in the event.keyName strings. I didn’t think it was that simple, and since I currently do not have a joystick to test (yet), I wanted/needed something in order to start getting my app ready for Amazon TV.
Thanks Josh! This helps a lot.
Happy to help. And just to give you some forewarning, end-users can connect non-Amazon gamepads to the Fire TV… such as a PS3 or Ouya gamepad. An Android device will actually accept any bluetooth device that supports the HID protocol. This includes bluetooth mice and keyboards as well. So, you might want to consider setting up a key/button mapping screen in your app as well, like how many PC games do it. I’m sure Amazon’s reviewers would be fine with your app only supporting their gamepads, but the ability to support other gamepads too would add extra polish that I’m sure your customers would like.
Good to know! I have PS3 and PS4 controllers, so I can give it a try.