diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java index f86193834..c779741d3 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java @@ -13,10 +13,12 @@ import android.os.Bundle; import android.util.DisplayMetrics; import android.view.Display; +import android.view.KeyEvent; import android.view.Surface; import android.view.View; import android.view.ViewGroup; +import org.mozilla.vrbrowser.VRBrowserActivity; import org.mozilla.vrbrowser.utils.SystemUtils; public class OffscreenDisplay { @@ -132,5 +134,10 @@ public void onCreate(Bundle savedInstanceState) { } catch (Exception e) { } } + + @Override + public boolean dispatchKeyEvent(KeyEvent event) { + return ((VRBrowserActivity)mContext).dispatchKeyEvent(event); + } } }