Merge pull request #9567 from kconger/master

Fix external device keypresses
This commit is contained in:
nazar-kutz 2020-08-04 11:27:12 +03:00 committed by GitHub
commit 51fc861817
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}