Index: apps/settings.c
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.c,v
retrieving revision 1.441
diff -u -b -B -p -r1.441 settings.c
--- apps/settings.c	19 Dec 2006 01:26:37 -0000	1.441
+++ apps/settings.c	19 Dec 2006 19:55:40 -0000
@@ -322,8 +322,8 @@ static const struct bit_entry rtc_bits[]
 #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.256
diff -u -b -B -p -r1.256 settings.h
--- apps/settings.h	19 Dec 2006 01:26:37 -0000	1.256
+++ apps/settings.h	19 Dec 2006 19:55:41 -0000
@@ -469,7 +469,7 @@ struct user_settings
     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.284
diff -u -b -B -p -r1.284 settings_menu.c
--- apps/settings_menu.c	19 Dec 2006 01:26:37 -0000	1.284
+++ apps/settings_menu.c	19 Dec 2006 19:55:41 -0000
@@ -1204,8 +1204,15 @@ static bool set_party_mode(void)
 #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.306
diff -u -b -B -p -r1.306 english.lang
--- apps/lang/english.lang	19 Dec 2006 12:26:03 -0000	1.306
+++ apps/lang/english.lang	19 Dec 2006 19:55:43 -0000
@@ -3192,13 +3192,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>
@@ -10442,3 +10442,65 @@
     *: "Clear Time?"
   </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.162
diff -u -b -B -p -r1.162 button.c
--- firmware/drivers/button.c	19 Dec 2006 16:50:07 -0000	1.162
+++ firmware/drivers/button.c	19 Dec 2006 19:55:43 -0000
@@ -44,7 +44,7 @@ static long last_read; /* Last button st
 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
@@ -73,6 +73,7 @@ static void button_tick(void)
     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
@@ -227,10 +228,38 @@ static void button_tick(void)
                     }
                     else
 #endif
-                        if (!filter_first_keypress || is_backlight_on())
+                        if (is_backlight_on())
+                        {
                             queue_post(&button_queue, btn, 0);
+                        }
+                        else
+                        {
+                            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, 0);
 #endif
@@ -241,8 +270,9 @@ static void button_tick(void)
                     remote_backlight_on();
                 else
 #endif
+                    if (turn_backlight_on)
+                    {
                     backlight_on();
-
                 reset_poweroff_timer();
             }
         }
@@ -246,6 +276,7 @@ static void button_tick(void)
                 reset_poweroff_timer();
             }
         }
+        }
         else
         {
             repeat = false;
@@ -289,7 +320,7 @@ void button_init(void)
     flipped = false;
 #endif
 #ifdef CONFIG_BACKLIGHT
-    filter_first_keypress = false;
+    filter_first_keypress = 0;
 #ifdef HAVE_REMOTE_LCD
     remote_filter_first_keypress = false;
 #endif    
@@ -361,7 +392,7 @@ void button_set_flip(bool flip)
 #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.61
diff -u -b -B -p -r1.61 button.h
--- firmware/export/button.h	27 Nov 2006 02:15:33 -0000	1.61
+++ firmware/export/button.h	19 Dec 2006 19:55:43 -0000
@@ -35,7 +35,7 @@ void button_clear_queue(void);
 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.19
diff -u -b -B -p -r1.19 button.c
--- uisimulator/sdl/button.c	19 Dec 2006 16:50:07 -0000	1.19
+++ uisimulator/sdl/button.c	19 Dec 2006 19:55:44 -0000
@@ -52,7 +52,7 @@ static int btn = 0;    /* Hopefully keep
 #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;
 }
