- Home /
Android, headset button keycode
Hi is is possible to use in game headset media button? In android i can get input event KEY_MEDIA Android key KEYCODE_HEADSETHOOK to get it work. Is it possible to get that event in unity?
Bump! Could you find any solution? This should be a general question (that works on iOS too). I'll investigate a bit more and create a plugin if possible.
Answer by KuR5 · Mar 27, 2017 at 11:32 AM
Hi,
I tried following snippet and got F7 for HandsFree Button.
void OnGUI()
{
Event e = Event.current;
if (e.isKey)
Debug.Log("Detected key code: " + e.keyCode);
}
Your answer
Follow this Question
Related Questions
How do I Optimize Resources/Unity_Builtin_Extra 2 Answers
Social.localUser.userName == "Lerpz" 1 Answer
Authentication is required you need to sign in google account? 2 Answers
How to include obb extension files in Google play developer console 0 Answers
I want to ask about Android developers 0 Answers