Fix external device keypresses

This commit is contained in:
keithconger 2020-08-03 13:35:47 -06:00
parent e01dd65f32
commit de449d1760

View file

@ -13,6 +13,7 @@ import net.osmand.plus.helpers.ScrollHelper;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.views.OsmandMapTileView;
import static net.osmand.plus.settings.backend.OsmandSettings.NO_EXTERNAL_DEVICE;
import static net.osmand.plus.settings.backend.OsmandSettings.GENERIC_EXTERNAL_DEVICE;
import static net.osmand.plus.settings.backend.OsmandSettings.PARROT_EXTERNAL_DEVICE;
import static net.osmand.plus.settings.backend.OsmandSettings.WUNDERLINQ_EXTERNAL_DEVICE;
@ -60,6 +61,8 @@ public class MapActivityKeyListener implements KeyEvent.Callback {
mapActivity.changeZoom(1);
return true;
}
} else if (settings.EXTERNAL_INPUT_DEVICE.get() != NO_EXTERNAL_DEVICE) {
return true;
} else if (mapScrollHelper.isScrollingDirectionKeyCode(keyCode)) {
return mapScrollHelper.onKeyDown(keyCode, event);
}