I'm trying to map a button in my fragment layout as a keypress on a keyboard. This is my button press:
Button down = (Button)(myView.findViewById(R.id.btnDOWN));
down.setOnTouchListener(new View.OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.i(TAG, "Down pressed");
return false;
}
});
I wasn't able to find any library which would allow me to do so, all I've found was reverse case, when a keyboard or controller press would be sent to device.
What I'm trying to generally do here, is an app that acts like a controller for RetroPie by using the phone as a bluetooth keyboard, with only the keys necessary for a specific controller.