This design means that you have to press the function key at the exact
moment the command in question was being executed. You have worked
around this by introducing an arbitrary delay, but that will produce a
horrible user experience, especially if used for more than one command.
GRUB has supported a --hotkey option to menuentry since 1.99, so you can
use e.g. 'menuentry "Memory test (memtest86+)" --hotkey f9'. You should
investigate using this instead.
This design means that you have to press the function key at the exact
moment the command in question was being executed. You have worked
around this by introducing an arbitrary delay, but that will produce a
horrible user experience, especially if used for more than one command.
GRUB has supported a --hotkey option to menuentry since 1.99, so you can
use e.g. 'menuentry "Memory test (memtest86+)" --hotkey f9'. You should
investigate using this instead.