01-23-2023, 06:02 AM
I want to make the power on and off function work directly with F11 and F12. How do I use a hotkey?
hotkey
|
01-23-2023, 06:02 AM
I want to make the power on and off function work directly with F11 and F12. How do I use a hotkey?
01-23-2023, 06:09 PM
01-23-2023, 07:19 PM
(01-23-2023, 06:09 PM)nguyen ha thai trong Wrote:F8 and later keys are disabled. unfortunately these commands don't work that way.(01-23-2023, 06:02 AM)hyun9358 Wrote: I want to make the power on and off function work directly with F11 and F12. How do I use a hotkey?elif [ "$vtHotkey" = "F6" ]; then (01-23-2023, 06:09 PM)nguyen ha thai trong Wrote:(01-23-2023, 06:02 AM)hyun9358 Wrote: I want to make the power on and off function work directly with F11 and F12. How do I use a hotkey?elif [ "$vtHotkey" = "F6" ]; then
01-24-2023, 06:35 AM
This problem must be longpanda, the command lines you and I mentioned in grub.cfg have no effect on the F1-9 keys, let alone F11, F12. Try deleting the block
#special VTOY_DEFAULT_IMAGE process if [ -n "$VTOY_DEFAULT_IMAGE" ]; then if regexp --set 1:vtHotkey --set 2:vtDefault "(F[2-9])>(.*)" "$VTOY_DEFAULT_IMAGE"; then set default="$vtDefault" if [ -z "$VTOY_MENU_TIMEOUT" ]; then set timeout=0 else set timeout=$VTOY_MENU_TIMEOUT fi export timeout export default vt_fn_mutex_lock 1 if [ "$vtHotkey" = "F2" ]; then unset timeout vt_browser_disk elif [ "$vtHotkey" = "F4" ]; then ventoy_localboot elif [ "$vtHotkey" = "F5" ]; then ventoy_diagnosis elif [ "$vtHotkey" = "F6" ]; then ventoy_ext_menu fi vt_fn_mutex_lock 0 unset timeout unset default fi fi Then try pressing the F1-9 keys, it still works. The above command block (as longpanda wrote) it only serves #special VTOY_DEFAULT_IMAGE process
01-25-2023, 03:27 AM
(This post was last modified: 01-25-2023, 04:11 AM by AlexBryansk.)
currently, the f11 and f12 buttons are not working. But this can be done with different spomobs:
1. Make changes to longpanda. 2. Change menu.c yourself and compile. 3. I can add to my mod_Ventoy, but then I will have to use something other than the original. 4. Abandon f11 and f12. And to do as it was in the early versions of ventoy (somewhere before 1.0.67), the power menu was called by f2. And add ventoy- browers to the main menu. All changes of clause 4 in grub.conf. submenu " ventoy browser" --class=iconFM { if [ "$VTOY_THEME_FMV" != "" ]; then if [ -f ${vt_plugin_path}${VTOY_THEME_FMV} ]; then set theme=${vt_plugin_path}${VTOY_THEME_FMV} fi fi unset timeout set VTOY_MENU_TIP_ENABLE=0 vt_browser_disk } ...... if [ "$vtHotkey" = "F2" ]; then ventoy_power elif [ "$vtHotkey" = "F4" ]; then ventoy_localboot elif [ "$vtHotkey" = "F5" ]; then ventoy_diagnosis elif [ "$vtHotkey" = "F6" ]; then ventoy_ext_menu elif [ "$vtHotkey" = "F9" ]; then ventoy_info fi vt_fn_mutex_lock 0 unset timeout unset default fi fi You can see the implementation of clause 4 in mod_ventoy 1.0.80
01-25-2023, 01:13 PM
(01-25-2023, 03:27 AM)AlexBryansk Wrote: currently, the f11 and f12 buttons are not working. But this can be done with different spomobs: ================================================================ Can't we add this feature in the next version? I wish it was added. |
« Next Oldest | Next Newest »
|