diff --git a/index.js b/index.js
index <HASH>..<HASH> 100755
--- a/index.js
+++ b/index.js
@@ -581,8 +581,15 @@ nativeWindow.setEventHandler((type, data) => {
             window.top.document.exitPointerLock();
             handled = true;
           }
-          if (window.top.document.fullscreenElement) {
+          if (window.top.document.fullscreenElement || nativeWindow.isVisible(windowHandle)) {
             window.top.document.exitFullscreen();
+            nativeWindow.exitFullscreen(windowHandle);
+            handled = true;
+          }
+        }
+        if (data.keyCode === 122){
+          if (window.top.document.fullscreenElement == null) {
+	    nativeWindow.setFullscreen(windowHandle);
             handled = true;
           }
         }
add fullscreen keybinding to f<I>