Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
menu item hotkey without immediately enter?
2019-09-14, 18:25
Post: #1
menu item hotkey without immediately enter?
hi, i not find any user option for assign hotkey to menu item which would only change focus, and user must manualy press enter... can be please this option be added? if not can someone please point me to part of src where i can disable it before compile? thanks Smile

btw: as novice with iPXE (before longtime PXELINUX user) i have more questions, is better create separated thread for each? or better make one thread with more "novice question" ? :-)
Find all posts by this user
Quote this message in a reply
2019-09-16, 12:15 (This post was last modified: 2019-09-16 17:09 by cckp.)
Post: #2
RE: menu item hotkey without immediately enter?
you can use hidden key to change menu default item

Code:
#!ipxe

:menu
menu
item a a itemA
item b b itemB

item -k a selecta
item -k b selectb
choose -d ${m} -k m
goto ${m} || goto menu${m}


:selecta
#prompt Aselect
set m a
goto menu

:selectb
#prompt Bselect
set m b
goto menu

:menua
prompt A
goto menu

:menub
prompt B
goto menu
Find all posts by this user
Quote this message in a reply
2019-09-16, 23:13
Post: #3
RE: menu item hotkey without immediately enter?
many thanks, this workaround work, but i have many (~130) items(in main and sub and subsub/subsubsub/... menus) with hotkey, then if all change to double items menu + create for each item_select part, this make whole ipxe scripts little confusing for me :-)

i still hope someone point me to source part, i try 2 hours search&read .c/.h files where find "key" "shortcut" "menu" etc, try make some change, but without success, because sure one word/line for change disabling enter for hotkey i miss :-)
Find all posts by this user
Quote this message in a reply
2019-09-17, 03:14
Post: #4
RE: menu item hotkey without immediately enter?
i found it... here is patches for others :-)

apply this patch for globally disabling enter for all items with --key used:
ipxe_menu_item_key_without_enter_global.patch

or apply this for menu item option -n or --noenter for user way specify item(s) with key without enter in *.ipxe skript:
ipxe_menu_item_key_without_enter_add_noenter_parameter.patch
Find all posts by this user
Quote this message in a reply
2019-09-17, 11:42
Post: #5
RE: menu item hotkey without immediately enter?
nice, though I can't see your code. it's forbidden to use Google.com in my country
Find all posts by this user
Quote this message in a reply
2019-09-17, 15:54
Post: #6
RE: menu item hotkey without immediately enter?
is not possible to me add here attachment (.patch, tar.xv say not supported, tar.gz is supported but error about not writen), if paste to messages in code, then is missed tabs, then for sure patch work without problem, i save to here where as raw checked is same as i have on disk...
Find all posts by this user
Quote this message in a reply
2019-09-17, 16:02
Post: #7
RE: menu item hotkey without immediately enter?
believe it or not, gist.github.com is forbidden in my country, though github.com is ok.
Find all posts by this user
Quote this message in a reply
2019-09-18, 22:43
Post: #8
RE: menu item hotkey without immediately enter?
and filebin.ca ?
ipxe_menu_item_key_without_enter_add_noenter_parameter.patch
ipxe_menu_item_key_without_enter_global.patch
Find all posts by this user
Quote this message in a reply
2019-09-19, 01:34
Post: #9
RE: menu item hotkey without immediately enter?
got it, finally Smile

thanks you a lot
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)