diff --git a/README.md b/README.md index cb127a4e..e435f71d 100644 --- a/README.md +++ b/README.md @@ -99,18 +99,18 @@ To change the font, **uosc** respects the mpv's `osd-font` configuration. These bindings are active when any **uosc** menu is open (main menu, playlist, load/select subtitles,...): -- `up`, `down` - select previous/next item -- `left`, `right` - back to parent menu or close, activate item -- `enter` - activate item -- `esc` - close menu -- `wheel_up`, `wheel_down` - scroll menu -- `pgup`, `pgdwn`, `home`, `end` - self explanatory -- `ctrl+f` or `\` - in case `menu_type_to_search` is disabled, these two trigger the menu search instead -- `ctrl+enter` - submits a search in menus without instant search -- `ctrl+up/down` - move selected item in menus that support it (playlist) -- `del` - delete selected item in menus that support it (playlist) -- `shift+enter`, `shift+right` - activate item without closing the menu -- `ctrl+enter`, `ctrl+click` - force activate an item, even if it's a submenu. In practical terms: activates a directory instead of navigation to its contents. +- `up`, `down` - Select previous/next item. +- `left`, `right` - Back to parent menu or close, activate item. +- `enter` - Activate item. +- `esc` - Close menu. +- `wheel_up`, `wheel_down` - Scroll menu. +- `pgup`, `pgdwn`, `home`, `end` - Self explanatory. +- `ctrl+f` or `\` - In case `menu_type_to_search` is disabled, these two trigger the menu search instead. +- `ctrl+enter` - Submits a search in menus without instant search. +- `ctrl+up/down` - Move selected item in menus that support it (playlist). +- `del` - Delete selected item in menus that support it (playlist). +- `shift+enter`, `shift+right` - Activate item without closing the menu. +- `alt+enter`, `alt+click` - In file navigating menus, opens a directory in mpv instead of navigating to its contents. Click on a faded parent menu to go back to it. diff --git a/scripts/uosc/elements/Menu.lua b/scripts/uosc/elements/Menu.lua index 0467ea6f..3ccba791 100644 --- a/scripts/uosc/elements/Menu.lua +++ b/scripts/uosc/elements/Menu.lua @@ -937,14 +937,19 @@ function Menu:enable_key_bindings() self:create_key_action('open_selected_item_soft', {shift = true})) self:add_key_binding('shift+mbtn_left', 'menu-select3', self:create_modified_mbtn_left_handler({shift = true})) self:add_key_binding('ctrl+mbtn_left', 'menu-select4', self:create_modified_mbtn_left_handler({ctrl = true})) + self:add_key_binding('alt+mbtn_left', 'menu-select4', self:create_modified_mbtn_left_handler({alt = true})) self:add_key_binding('mbtn_back', 'menu-back-alt3', self:create_key_action('back')) self:add_key_binding('bs', 'menu-back-alt4', self:create_key_action('key_bs'), {repeatable = true, complex = true}) self:add_key_binding('enter', 'menu-select-alt3', self:create_key_action('open_selected_item_preselect')) self:add_key_binding('kp_enter', 'menu-select-alt4', self:create_key_action('open_selected_item_preselect')) self:add_key_binding('ctrl+enter', 'menu-select-ctrl1', self:create_key_action('key_ctrl_enter', {ctrl = true})) + self:add_key_binding('alt+enter', 'menu-select-alt1', + self:create_key_action('open_selected_item_preselect', {alt = true})) self:add_key_binding('ctrl+kp_enter', 'menu-select-ctrl2', self:create_key_action('open_selected_item_preselect', {ctrl = true})) + self:add_key_binding('alt+kp_enter', 'menu-select-alt2', + self:create_key_action('open_selected_item_preselect', {alt = true})) self:add_key_binding('shift+enter', 'menu-select-alt5', self:create_key_action('open_selected_item_soft', {shift = true})) self:add_key_binding('shift+kp_enter', 'menu-select-alt6', diff --git a/scripts/uosc/lib/menus.lua b/scripts/uosc/lib/menus.lua index ddf61b0b..e0fdf04b 100644 --- a/scripts/uosc/lib/menus.lua +++ b/scripts/uosc/lib/menus.lua @@ -235,7 +235,7 @@ function open_file_navigation_menu(directory_path, handle_select, opts) return end - if info.is_dir and not meta.modifiers.ctrl then + if info.is_dir and not meta.modifiers.alt then -- Preselect directory we are coming from if is_to_parent then inheritable_options.selected_path = directory.path