Export to GitHub

grub4dos-chenall - issue #151

Request: allow invisible menu entries


Posted on Jul 15, 2013 by Happy Kangaroo

What steps will reproduce the problem?

It would be nice to have hotkey entries which do not have any menu entry visible to the user: e.g.

Example:

/hotkey

title xxxxx xx xx

title yyyy yyy yyy

hiddentitle ^F2 reboot

hiddentitle ^F3 halt

this would not be listed in the menu at all (not even as a blank line) but when the user pressed F2 it would reboot. If using write 0x8274 0x2001 it would NOT be numbered.

If necessary these could be only placed at the end of a menu (if easier to implement in code)

Comment #1

Posted on Oct 12, 2013 by Happy Kangaroo

Do you think you will be able to implement this? It would be really useful. The background bitmap could then have text in the bitmap in any position and font and icons we wanted for a number of different hotkeys but would not appear in the actual menu.

Comment #2

Posted on Oct 13, 2013 by Happy Hippo

This is difficult. this would be easier. hotkey [HOTKEY] COMMAND

Comment #3

Posted on Oct 13, 2013 by Happy Kangaroo

Using hotkey would be good. Could this have multiple commands?

e.g. hotkey [F9] reboot hotkey [F10] call /special.g4b hotkey [F1] find --set-root /xx.iso ;; map /xxx/iso (0xff) ;; map --hook ;; root (0xff) ;; chainloader (0xff)

??

Comment #4

Posted on Oct 13, 2013 by Happy Hippo

I think it should work.^_^

Comment #5

Posted on Oct 14, 2013 by Happy Hippo

Please try the new hotkey

New function hotkey [HOTKEY] COMMAND e.g hotkey [F9] reboot hotkey [A] "echo abcd ;; echo defg && pause test"

Comment #6

Posted on Oct 14, 2013 by Happy Kangaroo

Thanks - this looks promising... This seems have some strange affects on the menu (0.4.5c 2013-07-24 in graphics mode 800x600). hotkey [A] echo fred for instance blanks out all the menu entries, the top right menu item number goes to 255 and the menu highlight bar goes to the about 2/3 down the blank menu. Pressing cursor keys restores the menu.

How do you clear an entry - if moving from one menu to the another using configfile, it would be nice to clear all and/or individual entries

clear specific programmed hotkey entries

hotkey [A] --clear hotkey [F1] --clear

clear all programmed hotkey entries

hotkey --clear

maybe?

Thanks you for adding this, it will be a very useful feature when it is working properly :-)

Comment #7

Posted on Oct 14, 2013 by Happy Kangaroo

hotkey -u ;; hotkey

clears any previous programmed entries, so I guess I could use that?

Comment #8

Posted on Oct 14, 2013 by Happy Kangaroo

hotkey [A] configfile /fredmenu.lst hotkey [A] "configfile /fredmenu.lst"

neither of these seem to work as expected, and seem to 'randomly' run fredmenu.lst??

Comment #9

Posted on Oct 15, 2013 by Happy Hippo

Please try the new,this may be ok.some bug fixed and add help info.

you can use a NULL command to clear specific programmed hotkey entries e.g. hotkey [F1]

use hotkey -u can clear all programmed hotkey entries.

Comment #10

Posted on Oct 15, 2013 by Happy Kangaroo

Thanks, much better, but I am having a problem with echo commands

if in graphicsmode with 80x600 wallpaper, echo commands don't work. Usually, a menu entry is executed it clears the screen and switches to console but hotkey doesn't seem to do this - the hires menu and border are still present?

hotkey [Ctrl+F1] "echo Hi ;; pause ;; configfile /menu.lst"

even hotkey [Ctrl+F1] "grpahicsmode 3 ;; echo Hi ;; pause ;; configfile /menu.lst" does not echo to the screen

Comment #11

Posted on Oct 15, 2013 by Happy Hippo

Because the previous versions of grub4dos will Disable all output for hotkey.

Please try this grldr.

Attachments

Comment #12

Posted on Oct 15, 2013 by Happy Kangaroo

That works! This is great! Thank you for doing this work - hopefully this means there is less reason to use GFXBoot for some people now. :-) Is the change to grldr low risk?

Comment #13

Posted on Oct 15, 2013 by Happy Hippo

only add two lines..^

diff --git a/stage2/stage2.c b/stage2/stage2.c index f17e21d..34072f8 100644 --- a/stage2/stage2.c +++ b/stage2/stage2.c @@ -803,6 +803,8 @@ restart1: putchar_hooked = (unsigned char*)0x800; c = hotkey_func(0,-1); putchar_hooked = 0; + if (c == -1) + goto restart1; if (c>>16) { temp_entryno = (long)(unsigned char)(c>>16);

Comment #14

Posted on Oct 15, 2013 by Happy Kangaroo

P.S. HotKey Boot: xxxxxxxxxxxxxxxxxxxxx

is displayed on the screen - the whole command line is displayed. Is this necessary? or must we start all commmands with 'clear' ?

Comment #15

Posted on Oct 15, 2013 by Happy Kangaroo

I am getting message 'not enough space' How much space is there for commands? Can it be increased a bit as I only have added 2.

Comment #16

Posted on Oct 15, 2013 by Happy Kangaroo

also after adding 5 small hotkeys, I am getting 'error: wrong hotkey cmd space address!' when trying to add another.

Comment #17

Posted on Oct 15, 2013 by Happy Hippo

1.HotKey Boot: xxxxxxxxxxxxxxxxxxxxx I think we need a control to set it show or hide. e.g. debug off

2.current 4KB limit for all hotkey cmds.

3.This may be bug.

Comment #18

Posted on Oct 15, 2013 by Happy Kangaroo

When you run the old hotkey with no parameters you just got a short message displayed, now new hotkey display a load of help text. This makes it incompatible with old version. Could we have usage displayed only if hotkey -h maybe?

Comment #19

Posted on Oct 15, 2013 by Happy Hippo

This message will display only run in COMMANDLINE,but there is a bug in uploaded version.

Please try this.

Attachments

Comment #20

Posted on Oct 15, 2013 by Happy Kangaroo

that's better with help suppressed. :-)

Comment #21

Posted on Oct 16, 2013 by Happy Hippo

(No comment was entered for this change.)

Comment #22

Posted on Oct 16, 2013 by Happy Kangaroo

can you release the new grldr so it can be used with the new hotkey please?

Comment #23

Posted on Oct 17, 2013 by Happy Hippo

Ok,uploaded! With the new version,i also add a new feature, can quickly access the system_variables(read only),using read command.

e.g.

read VAR.42 ;; set color_32=%@retval% read VAR.43 ;; set color_fg=%@retval%

note: This feature is for developers,undocumented.

Status: Verified

Labels:
Type-Defect Priority-Medium