|
@@ -1633,6 +1633,13 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|
|
int source = event.getSource();
|
|
int source = event.getSource();
|
|
|
InputDevice device = InputDevice.getDevice(deviceId);
|
|
InputDevice device = InputDevice.getDevice(deviceId);
|
|
|
|
|
|
|
|
|
|
+ if ((event.getFlags() & KeyEvent.FLAG_FALLBACK) != 0) {
|
|
|
|
|
+ // If this is a fallback event -- e.g., the mouse is being turned into dpad navigational keys
|
|
|
|
|
+ // just eat it, since that's almost never what we actually want to have happen. This will
|
|
|
|
|
+ // happen with Logitech mice on Amazon Fire TV devices and some Samsung devices.
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (source == InputDevice.SOURCE_UNKNOWN) {
|
|
if (source == InputDevice.SOURCE_UNKNOWN) {
|
|
|
if (device != null) {
|
|
if (device != null) {
|
|
|
source = device.getSources();
|
|
source = device.getSources();
|