From dbef44dee55e1aebc0a1ee9bc88e9a7466b43633 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 31 Jul 2006 20:04:51 +0200 Subject: [PATCH] Add Escape as a shortcut for closing fullscreen. --- pr0n-fullscreen.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pr0n-fullscreen.js b/pr0n-fullscreen.js index 4092ea2..468f249 100644 --- a/pr0n-fullscreen.js +++ b/pr0n-fullscreen.js @@ -188,6 +188,8 @@ function key_down(which) 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(); } + } else if (which == 27) { // escape + set_opacity("close", 0.7); + do_close(); } } -- 2.39.2