summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/app/button-application.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/android/app/button-application.c')
-rw-r--r--firmware/target/hosted/android/app/button-application.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/target/hosted/android/app/button-application.c b/firmware/target/hosted/android/app/button-application.c
index 47798a6096..a7d75ef172 100644
--- a/firmware/target/hosted/android/app/button-application.c
+++ b/firmware/target/hosted/android/app/button-application.c
@@ -45,3 +45,24 @@ int key_to_button(int keyboard_key)
45 return BUTTON_MENU; 45 return BUTTON_MENU;
46 } 46 }
47} 47}
48
49unsigned multimedia_to_button(int keyboard_key)
50{
51 switch (keyboard_key)
52 {
53 case KEYCODE_MEDIA_PLAY_PAUSE:
54 return BUTTON_MULTIMEDIA_PLAYPAUSE;
55 case KEYCODE_MEDIA_STOP:
56 return BUTTON_MULTIMEDIA_STOP;
57 case KEYCODE_MEDIA_NEXT:
58 return BUTTON_MULTIMEDIA_NEXT;
59 case KEYCODE_MEDIA_PREVIOUS:
60 return BUTTON_MULTIMEDIA_PREV;
61 case KEYCODE_MEDIA_REWIND:
62 return BUTTON_MULTIMEDIA_REW;
63 case KEYCODE_MEDIA_FAST_FORWARD:
64 return BUTTON_MULTIMEDIA_FFWD;
65 default:
66 return 0;
67 }
68}