]> git.sesse.net Git - pr0n/commitdiff
Add Escape as a shortcut for closing fullscreen.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 31 Jul 2006 18:04:51 +0000 (20:04 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 31 Jul 2006 18:04:51 +0000 (20:04 +0200)
pr0n-fullscreen.js

index 4092ea235ac69f50e1072950e436f0d5118d94ca..468f249c0c6c780b30c87eed132d5923f8ec8968 100644 (file)
@@ -188,6 +188,8 @@ function key_down(which)
                if (can_go_previous()) {
                        set_opacity("previous", 0.99);
                }
                if (can_go_previous()) {
                        set_opacity("previous", 0.99);
                }
+       } else if (which == 27) {   // escape
+               set_opacity("close", 0.99);
        }
 }
 
        }
 }
 
@@ -202,6 +204,9 @@ function key_up(which) {
                        set_opacity("previous", 0.7);
                        go_previous();
                }
                        set_opacity("previous", 0.7);
                        go_previous();
                }
+       } else if (which == 27) {   // escape
+               set_opacity("close", 0.7);
+               do_close();
        }
 }
 
        }
 }