Ctrl-X -> return to text mode immediately
authorhpa <hpa>
Fri, 8 Apr 2005 16:33:32 +0000 (16:33 +0000)
committerhpa <hpa>
Fri, 8 Apr 2005 16:33:32 +0000 (16:33 +0000)
NEWS
ui.inc

diff --git a/NEWS b/NEWS
index dd969a0..32b944f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Changes in 3.08:
        * EXTLINUX: Sparse files now handled correctly.
        * EXTLINUX: Large directories now handled correctly.
        * Fix configuration file parsing error, that could cause hangs.
+       * ALL: At the prompt, Ctrl-X now forces text mode.
 
 Changes in 3.07:
        * Fix chainloading (chain.c32).
diff --git a/ui.inc b/ui.inc
index 246b66c..06b67e9 100644 (file)
--- a/ui.inc
+++ b/ui.inc
@@ -102,12 +102,14 @@ enter_char:       test byte [FuncFlag],1
 not_ascii:     mov byte [FuncFlag],0
                cmp al,0Dh                      ; Enter
                je command_done
-               cmp al,06h                      ; <Ctrl-F>
+               cmp al,'F' & 1Fh                ; <Ctrl-F>
                je set_func_flag
-               cmp al,15h                      ; <Ctrl-U>
+               cmp al,'U' & 1Fh                ; <Ctrl-U>
                je kill_command                 ; Kill input line
-               cmp al,16h                      ; <Ctrl-V>
+               cmp al,'V' & 1Fh                ; <Ctrl-V>
                je print_version
+               cmp al,'X' & 1Fh                ; <Ctrl-X>
+               je force_text_mode
                cmp al,08h                      ; Backspace
                jne get_char
 backspace:     cmp di,command_line             ; Make sure there is anything
@@ -121,6 +123,10 @@ kill_command:
                call crlf
                jmp enter_command
 
+force_text_mode:
+               call vgaclearmode
+               jmp enter_command
+
 set_func_flag:
                mov byte [FuncFlag],1
 get_char_2: