diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index d39edb9b2..d1716e009 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -16,6 +16,7 @@ import android.view.KeyEvent; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import android.widget.EditText; import android.widget.FrameLayout; import android.widget.Toast; import androidx.annotation.NonNull; @@ -542,6 +543,11 @@ public class MainActivity extends CastEnabledActivity { //Hardware keyboard support @Override public boolean onKeyUp(int keyCode, KeyEvent event) { + View currentFocus = getCurrentFocus(); + if (currentFocus instanceof EditText) { + return super.onKeyUp(keyCode, event); + } + AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE); Integer customKeyCode = null; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index 2d4510e8f..9ab1755f5 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -12,6 +12,7 @@ import android.view.KeyEvent; import android.view.animation.AlphaAnimation; import android.view.animation.AnimationSet; import android.view.animation.ScaleAnimation; +import android.widget.EditText; import android.widget.ImageView; import androidx.appcompat.view.menu.ActionMenuItem; @@ -489,6 +490,11 @@ public class VideoplayerActivity extends MediaplayerActivity { //Hardware keyboard support @Override public boolean onKeyUp(int keyCode, KeyEvent event) { + View currentFocus = getCurrentFocus(); + if (currentFocus instanceof EditText) { + return super.onKeyUp(keyCode, event); + } + AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE); switch (keyCode) {