diff --git a/README.md b/README.md index d2b4edb..382fc85 100644 --- a/README.md +++ b/README.md @@ -379,7 +379,7 @@ Adding items to menu is facilitated by commenting your keybinds in `input.conf` Comment has to be at the end of the line with the binding. -Comment has to start with `#!`. +Comment has to start with `#!` (or `#menu:`). Text after `#!` is an item title. diff --git a/uosc.lua b/uosc.lua index f987e34..23d9f77 100644 --- a/uosc.lua +++ b/uosc.lua @@ -2825,6 +2825,9 @@ state.context_menu_items = (function() for line in io.lines(input_conf_path) do local key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#!%s*(.*)') + if not key then + key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#menu:%s*(.*)') + end if key then local is_dummy = key:sub(1, 1) == '#' local submenu_id = ''