Index: apps/settings.c
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.c,v
retrieving revision 1.436
diff -u -r1.436 settings.c
--- apps/settings.c	9 Nov 2006 12:27:56 -0000	1.436
+++ apps/settings.c	10 Nov 2006 02:27:46 -0000
@@ -322,8 +322,8 @@
 #endif
 
 #ifdef CONFIG_BACKLIGHT
-    {1, S_O(bl_filter_first_keypress), false,
-            "backlight filters first keypress", off_on },
+    {2, S_O(bl_filter_first_keypress), 0,
+            "backlight filters first keypress", "mode0,mode1,mode2,mode3" },
 #ifdef HAVE_REMOTE_LCD
     {1, S_O(remote_bl_filter_first_keypress), false,
             "backlight filters first remote keypress", off_on },
Index: apps/settings.h
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.h,v
retrieving revision 1.252
diff -u -r1.252 settings.h
--- apps/settings.h	9 Nov 2006 12:27:56 -0000	1.252
+++ apps/settings.h	10 Nov 2006 02:27:46 -0000
@@ -461,7 +461,7 @@
     bool party_mode;    /* party mode - unstoppable music */
     
 #ifdef CONFIG_BACKLIGHT
-    bool bl_filter_first_keypress;   /* filter first keypress when dark? */
+    int bl_filter_first_keypress;   /* filter first keypress when dark? */
 #ifdef HAVE_REMOTE_LCD
     bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */
 #endif
Index: apps/settings_menu.c
===================================================================
RCS file: /cvsroot/rockbox/apps/settings_menu.c,v
retrieving revision 1.281
diff -u -r1.281 settings_menu.c
--- apps/settings_menu.c	25 Oct 2006 10:17:54 -0000	1.281
+++ apps/settings_menu.c	10 Nov 2006 02:27:47 -0000
@@ -1203,8 +1203,15 @@
 #ifdef CONFIG_BACKLIGHT
 static bool set_bl_filter_first_keypress(void)
 {
-    bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS),
-                            &global_settings.bl_filter_first_keypress );
+    static const struct opt_items names[] = {
+        { STR(LANG_BACKLIGHT_FILTER_MODE0) },
+        { STR(LANG_BACKLIGHT_FILTER_MODE1) },
+        { STR(LANG_BACKLIGHT_FILTER_MODE2) },
+        { STR(LANG_BACKLIGHT_FILTER_MODE3) }
+    };
+    bool result = set_option(str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS),
+                             &global_settings.bl_filter_first_keypress,
+                             INT, names, 4, NULL );
     set_backlight_filter_keypress(global_settings.bl_filter_first_keypress);
     return result;
 }
Index: apps/lang/english.lang
===================================================================
RCS file: /cvsroot/rockbox/apps/lang/english.lang,v
retrieving revision 1.296
diff -u -r1.296 english.lang
--- apps/lang/english.lang	9 Nov 2006 12:27:56 -0000	1.296
+++ apps/lang/english.lang	10 Nov 2006 02:27:48 -0000
@@ -3186,13 +3186,13 @@
   desc: Backlight behaviour setting
   user:
   <source>
-    *: "First Keypress Enables Backlight Only"
+    *: "Keypress effects when backlight is off"
   </source>
   <dest>
-    *: "First Keypress Enables Backlight Only"
+    *: "Keypress effects when backlight is off"
   </dest>
   <voice>
-    *: "First Keypress Enables Backlight Only"
+    *: "Keypress effects when backlight is off"
   </voice>
 </phrase>
 <phrase>
@@ -10196,3 +10196,65 @@
     *: "New file"
   </voice>
 </phrase>
+<phrase>
+  id: LANG_BACKLIGHT_FILTER_MODE0
+  desc: Backlight behaviour setting
+  user:
+  <source>
+    *: "All: BL & action"
+  </source>
+  <dest>
+    *: "All: BL & action"
+  </dest>
+  <voice>
+    *: "All: BL & action"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_BACKLIGHT_FILTER_MODE1
+  desc: Backlight behaviour setting
+  user:
+  <source>
+    *: "All: BL & no action"
+  </source>
+  <dest>
+    *: "All: BL & no action"
+  </dest>
+  <voice>
+    *: "All: BL & no action"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_BACKLIGHT_FILTER_MODE2
+  desc: Backlight behaviour setting
+  user:
+  <source>
+    *: "Select: BL, others: action & BL"
+    h300: "NAVI: BL, others: action & BL"
+  </source>
+  <dest>
+    *: "Select: BL, others: action & BL"
+    h300: "NAVI: BL, others: action & BL"
+  </dest>
+  <voice>
+    *: "Select: BL, others: action & BL"
+    h300: "NAVI: BL, others: action & BL"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_BACKLIGHT_FILTER_MODE3
+  desc: Backlight behaviour setting
+  user:
+  <source>
+    *: "Select: BL, Mode: action & BL, others: action"
+    h300: "NAVI: BL, A-B: action & BL, others: action"
+  </source>
+  <dest>
+    *: "Select: BL, Mode: action & BL, others: action"
+    h300: "NAVI: BL, A-B: action & BL, others: action"
+  </dest>
+  <voice>
+    *: "Select: BL, Mode: action & BL, others: action"
+    h300: "NAVI: BL, A-B: action & BL, others: action"
+  </voice>
+</phrase>
Index: firmware/drivers/button.c
===================================================================
RCS file: /cvsroot/rockbox/firmware/drivers/button.c,v
retrieving revision 1.159
diff -u -r1.159 button.c
--- firmware/drivers/button.c	10 Nov 2006 01:54:47 -0000	1.159
+++ firmware/drivers/button.c	10 Nov 2006 02:27:49 -0000
@@ -56,7 +56,7 @@
 static bool flipped;  /* buttons can be flipped to match the LCD flip */
 #endif
 #ifdef CONFIG_BACKLIGHT
-static bool filter_first_keypress;
+static int filter_first_keypress;
 #ifdef HAVE_REMOTE_LCD
 static bool remote_filter_first_keypress;
 #endif
@@ -92,6 +92,7 @@
     static bool post = false;
 #ifdef CONFIG_BACKLIGHT
     static bool skip_release = false;
+    bool turn_backlight_on = true;
 #ifdef HAVE_REMOTE_LCD
     static bool skip_remote_release = false;
 #endif
@@ -249,10 +250,38 @@
                     }
                     else
 #endif
-                        if (!filter_first_keypress || is_backlight_on())
+                        if (is_backlight_on())
+                        {
                             queue_post(&button_queue, btn, NULL);
+                        }
                         else
-                            skip_release = true;
+                        {
+                            switch (filter_first_keypress)
+                            {
+                                case 0:
+                                    queue_post(&button_queue, btn, NULL);
+                                    break;
+                                case 1:
+                                    skip_release = true;
+                                    break;
+                                case 2:
+                                    if (btn == BUTTON_SELECT)
+                                        skip_release = true;
+                                    else
+                                        queue_post(&button_queue, btn, NULL);
+                                    break;
+                                case 3:
+                                    if (btn == BUTTON_SELECT)
+                                        skip_release = true;
+                                    else
+                                    {
+                                        if (btn != BUTTON_MODE)
+                                            turn_backlight_on = false;
+                                        queue_post(&button_queue, btn, NULL);
+                                    }
+                                    break;
+                            }
+                        }
 #else /* no backlight, nothing to skip */
                     queue_post(&button_queue, btn, NULL);
 #endif
@@ -263,9 +292,11 @@
                     remote_backlight_on();
                 else
 #endif
-                    backlight_on();
-
-                reset_poweroff_timer();
+                    if (turn_backlight_on)
+                    {
+                        backlight_on();
+                        reset_poweroff_timer();
+                    }
             }
         }
         else
@@ -327,7 +358,7 @@
     flipped = false;
 #endif
 #ifdef CONFIG_BACKLIGHT
-    filter_first_keypress = false;
+    filter_first_keypress = 0;
 #ifdef HAVE_REMOTE_LCD
     remote_filter_first_keypress = false;
 #endif    
@@ -399,7 +430,7 @@
 #endif /* HAVE_LCD_BITMAP */
 
 #ifdef CONFIG_BACKLIGHT
-void set_backlight_filter_keypress(bool value)
+void set_backlight_filter_keypress(int value)
 {
     filter_first_keypress = value;
 }
Index: firmware/export/button.h
===================================================================
RCS file: /cvsroot/rockbox/firmware/export/button.h,v
retrieving revision 1.59
diff -u -r1.59 button.h
--- firmware/export/button.h	9 Nov 2006 22:58:35 -0000	1.59
+++ firmware/export/button.h	10 Nov 2006 02:27:49 -0000
@@ -38,7 +38,7 @@
 void button_set_flip(bool flip); /* turn 180 degrees */
 #endif
 #ifdef CONFIG_BACKLIGHT
-void set_backlight_filter_keypress(bool value);
+void set_backlight_filter_keypress(int value);
 #ifdef HAVE_REMOTE_LCD
 void set_remote_backlight_filter_keypress(bool value);
 #endif
Index: uisimulator/sdl/button.c
===================================================================
RCS file: /cvsroot/rockbox/uisimulator/sdl/button.c,v
retrieving revision 1.17
diff -u -r1.17 button.c
--- uisimulator/sdl/button.c	26 Oct 2006 13:38:09 -0000	1.17
+++ uisimulator/sdl/button.c	10 Nov 2006 02:27:50 -0000
@@ -52,7 +52,7 @@
 #ifdef CONFIG_BACKLIGHT
 static bool filter_first_keypress;
 
-void set_backlight_filter_keypress(bool value)
+void set_backlight_filter_keypress(int value)
 {
     filter_first_keypress = value;
 }
