123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367 |
- -- parse Lua modified keymap.clj into Markdown table
- local keymaps = {
- darwin = {
- ["A"] = "add",
- ["Alt+Backspace"] = "delete-prev-word",
- ["Alt+Delete"] = "delete-next-word",
- ["Alt+Down"] = "end-of-line",
- ["Alt+Down"] = "move-down",
- ["Alt+Left"] = "prev-word",
- ["Alt+Meta+E"] = "select-next-occurrence",
- ["Alt+Meta+F"] = "replace-text",
- ["Alt+Meta+G"] = "replace-next",
- ["Alt+Right"] = "next-word",
- ["Alt+Up"] = "beginning-of-line",
- ["Alt+Up"] = "move-up",
- ["Backspace"] = "delete-backward",
- ["Ctrl+A"] = "beginning-of-line",
- ["Ctrl+D"] = "delete-line",
- ["Ctrl+E"] = "end-of-line",
- ["Ctrl+I"] = "reindent",
- ["Ctrl+K"] = "delete-to-end-of-line",
- ["Ctrl+Meta+H"] = "toggle-component-guides",
- ["Ctrl+R"] = "reload-stylesheet",
- ["Ctrl+Space"] = "proposals",
- ["Delete"] = "delete",
- ["Down"] = "down",
- ["E"] = "rotate-tool",
- ["End"] = "end-of-line",
- ["Enter"] = "enter",
- ["Esc"] = "escape",
- ["F"] = "frame-selection",
- ["F1"] = "documentation",
- ["F10"] = "step-over",
- ["F11"] = "step-into",
- ["F2"] = "rename",
- ["F5"] = "start-debugger",
- ["F5"] = "continue",
- ["F6"] = "toggle-pane-left",
- ["F7"] = "toggle-pane-bottom",
- ["F8"] = "toggle-pane-right",
- ["F9"] = "toggle-breakpoint",
- ["Home"] = "beginning-of-line-text",
- ["Left"] = "left",
- ["Meta+'+'"] = "zoom-in",
- ["Meta+'-'"] = "zoom-out",
- ["Meta+A"] = "select-all",
- ["Meta+B"] = "build",
- ["Meta+C"] = "copy",
- ["Meta+Comma"] = "preferences",
- ["Meta+D"] = "select-next-occurrence",
- ["Meta+Delete"] = "delete-to-end-of-line",
- ["Meta+Down"] = "end-of-file",
- ["Meta+E"] = "hide-selected",
- ["Meta+F"] = "filter-form",
- ["Meta+F"] = "find-text",
- ["Meta+G"] = "find-next",
- ["Meta+L"] = "goto-line",
- ["Meta+Left"] = "beginning-of-line-text",
- ["Meta+N"] = "new-file",
- ["Meta+O"] = "open",
- ["Meta+P"] = "open-asset",
- ["Meta+Q"] = "quit",
- ["Meta+R"] = "hot-reload",
- ["Meta+Right"] = "end-of-line",
- ["Meta+S"] = "save-all",
- ["Meta+Slash"] = "toggle-comment",
- ["Meta+T"] = "scene-stop",
- ["Meta+U"] = "rebundle",
- ["Meta+Up"] = "beginning-of-file",
- ["Meta+V"] = "paste",
- ["Meta+W"] = "close",
- ["Meta+X"] = "cut",
- ["Meta+Z"] = "undo",
- ["Page Down"] = "page-down",
- ["Page Up"] = "page-up",
- ["Period"] = "realign-camera",
- ["R"] = "scale-tool",
- ["Right"] = "right",
- ["Shift+A"] = "add-secondary",
- ["Shift+Alt+Down"] = "select-end-of-line",
- ["Shift+Alt+Left"] = "select-prev-word",
- ["Shift+Alt+Right"] = "select-next-word",
- ["Shift+Alt+Up"] = "select-beginning-of-line",
- ["Shift+Ctrl+A"] = "select-beginning-of-line",
- ["Shift+Ctrl+E"] = "select-end-of-line",
- ["Shift+Ctrl+Left"] = "select-prev-word",
- ["Shift+Ctrl+Right"] = "select-next-word",
- ["Shift+Down"] = "down-major",
- ["Shift+Down"] = "select-down",
- ["Shift+E"] = "erase-tool",
- ["Shift+End"] = "select-end-of-line",
- ["Shift+F11"] = "step-out",
- ["Shift+Home"] = "select-beginning-of-line-text",
- ["Shift+Left"] = "left-major",
- ["Shift+Left"] = "select-left",
- ["Shift+Meta+B"] = "rebuild",
- ["Shift+Meta+Delete"] = "delete-to-end-of-line",
- ["Shift+Meta+Down"] = "select-end-of-file",
- ["Shift+Meta+E"] = "show-last-hidden",
- ["Shift+Meta+F"] = "search-in-files",
- ["Shift+Meta+G"] = "find-prev",
- ["Shift+Meta+I"] = "toggle-visibility-filters",
- ["Shift+Meta+L"] = "split-selection-into-lines",
- ["Shift+Meta+Left"] = "select-beginning-of-line-text",
- ["Shift+Meta+R"] = "open-asset",
- ["Shift+Meta+Right"] = "select-end-of-line",
- ["Shift+Meta+Up"] = "select-beginning-of-file",
- ["Shift+Meta+W"] = "close-all",
- ["Shift+Meta+Z"] = "redo",
- ["Shift+Page Down"] = "select-page-down",
- ["Shift+Page Up"] = "select-page-up",
- ["Shift+Right"] = "right-major",
- ["Shift+Right"] = "select-right",
- ["Shift+Tab"] = "backwards-tab-trigger",
- ["Shift+Up"] = "select-up",
- ["Shift+Up"] = "up-major",
- ["Space"] = "scene-play",
- ["Space"] = "show-palette",
- ["Tab"] = "tab",
- ["Up"] = "up",
- ["W"] = "move-tool",
- },
- win32 = {
- ["A"] = "add",
- ["Alt+Down"] = "move-down",
- ["Alt+Up"] = "move-up",
- ["Backspace"] = "delete-backward",
- ["Ctrl+'+'"] = "zoom-in",
- ["Ctrl+'-'"] = "zoom-out",
- ["Ctrl+A"] = "select-all",
- ["Ctrl+B"] = "build",
- ["Ctrl+Backspace"] = "delete-prev-word",
- ["Ctrl+C"] = "copy",
- ["Ctrl+Comma"] = "preferences",
- ["Ctrl+D"] = "select-next-occurrence",
- ["Ctrl+Delete"] = "delete-next-word",
- ["Ctrl+E"] = "hide-selected",
- ["Ctrl+End"] = "end-of-file",
- ["Ctrl+F"] = "filter-form",
- ["Ctrl+F"] = "find-text",
- ["Ctrl+G"] = "find-next",
- ["Ctrl+H"] = "replace-text",
- ["Ctrl+H"] = "toggle-component-guides",
- ["Ctrl+Home"] = "beginning-of-file",
- ["Ctrl+I"] = "reindent",
- ["Ctrl+K"] = "delete-to-end-of-line",
- ["Ctrl+L"] = "goto-line",
- ["Ctrl+Left"] = "prev-word",
- ["Ctrl+N"] = "new-file",
- ["Ctrl+O"] = "open",
- ["Ctrl+P"] = "open-asset",
- ["Ctrl+Q"] = "quit",
- ["Ctrl+R"] = "hot-reload",
- ["Ctrl+Right"] = "next-word",
- ["Ctrl+S"] = "save-all",
- ["Ctrl+Slash"] = "toggle-comment",
- ["Ctrl+Space"] = "proposals",
- ["Ctrl+T"] = "scene-stop",
- ["Ctrl+U"] = "rebundle",
- ["Ctrl+V"] = "paste",
- ["Ctrl+W"] = "close",
- ["Ctrl+X"] = "cut",
- ["Ctrl+Z"] = "undo",
- ["Delete"] = "delete",
- ["Down"] = "down",
- ["E"] = "rotate-tool",
- ["End"] = "end-of-line",
- ["Enter"] = "enter",
- ["Esc"] = "escape",
- ["F"] = "frame-selection",
- ["F1"] = "documentation",
- ["F10"] = "step-over",
- ["F11"] = "step-into",
- ["F2"] = "rename",
- ["F5"] = "start-debugger",
- ["F5"] = "continue",
- ["F6"] = "toggle-pane-left",
- ["F7"] = "toggle-pane-bottom",
- ["F8"] = "toggle-pane-right",
- ["F9"] = "toggle-breakpoint",
- ["Home"] = "beginning-of-line-text",
- ["Left"] = "left",
- ["Page Down"] = "page-down",
- ["Page Up"] = "page-up",
- ["Period"] = "realign-camera",
- ["R"] = "scale-tool",
- ["Right"] = "right",
- ["Shift+A"] = "add-secondary",
- ["Shift+Ctrl+B"] = "rebuild",
- ["Shift+Ctrl+Delete"] = "delete-to-end-of-line",
- ["Shift+Ctrl+E"] = "show-last-hidden",
- ["Shift+Ctrl+End"] = "select-end-of-file",
- ["Shift+Ctrl+F"] = "search-in-files",
- ["Shift+Ctrl+G"] = "find-prev",
- ["Shift+Ctrl+H"] = "replace-next",
- ["Shift+Ctrl+Home"] = "select-beginning-of-file",
- ["Shift+Ctrl+I"] = "toggle-visibility-filters",
- ["Shift+Ctrl+L"] = "split-selection-into-lines",
- ["Shift+Ctrl+Left"] = "select-prev-word",
- ["Shift+Ctrl+R"] = "open-asset",
- ["Shift+Ctrl+Right"] = "select-next-word",
- ["Shift+Ctrl+W"] = "close-all",
- ["Shift+Ctrl+Z"] = "redo",
- ["Shift+Down"] = "down-major",
- ["Shift+Down"] = "select-down",
- ["Shift+E"] = "erase-tool",
- ["Shift+End"] = "select-end-of-line",
- ["Shift+F11"] = "step-out",
- ["Shift+F5"] = "stop-debugger",
- ["Shift+Home"] = "select-beginning-of-line-text",
- ["Shift+Left"] = "left-major",
- ["Shift+Left"] = "select-left",
- ["Shift+Page Down"] = "select-page-down",
- ["Shift+Page Up"] = "select-page-up",
- ["Shift+Right"] = "right-major",
- ["Shift+Right"] = "select-right",
- ["Shift+Tab"] = "backwards-tab-trigger",
- ["Shift+Up"] = "select-up",
- ["Shift+Up"] = "up-major",
- ["Space"] = "scene-play",
- ["Space"] = "show-palette",
- ["Tab"] = "tab",
- ["Up"] = "up",
- ["W"] = "move-tool",
- },
- linux = {
- ["A"] = "add",
- ["Alt+Down"] = "move-down",
- ["Alt+Up"] = "move-up",
- ["Backspace"] = "delete-backward",
- ["Ctrl+'+'"] = "zoom-in",
- ["Ctrl+'-'"] = "zoom-out",
- ["Ctrl+A"] = "select-all",
- ["Ctrl+B"] = "build",
- ["Ctrl+Backspace"] = "delete-prev-word",
- ["Ctrl+C"] = "copy",
- ["Ctrl+Comma"] = "preferences",
- ["Ctrl+D"] = "select-next-occurrence",
- ["Ctrl+Delete"] = "delete-next-word",
- ["Ctrl+E"] = "hide-selected",
- ["Ctrl+End"] = "end-of-file",
- ["Ctrl+F"] = "filter-form",
- ["Ctrl+F"] = "find-text",
- ["Ctrl+G"] = "find-next",
- ["Ctrl+H"] = "replace-text",
- ["Ctrl+H"] = "toggle-component-guides",
- ["Ctrl+Home"] = "beginning-of-file",
- ["Ctrl+I"] = "reindent",
- ["Ctrl+K"] = "delete-to-end-of-line",
- ["Ctrl+L"] = "goto-line",
- ["Ctrl+Left"] = "prev-word",
- ["Ctrl+N"] = "new-file",
- ["Ctrl+O"] = "open",
- ["Ctrl+P"] = "open-asset",
- ["Ctrl+Q"] = "quit",
- ["Ctrl+R"] = "hot-reload",
- ["Ctrl+Right"] = "next-word",
- ["Ctrl+S"] = "save-all",
- ["Ctrl+Slash"] = "toggle-comment",
- ["Ctrl+Space"] = "proposals",
- ["Ctrl+T"] = "scene-stop",
- ["Ctrl+U"] = "rebundle",
- ["Ctrl+V"] = "paste",
- ["Ctrl+W"] = "close",
- ["Ctrl+X"] = "cut",
- ["Ctrl+Z"] = "undo",
- ["Delete"] = "delete",
- ["Down"] = "down",
- ["E"] = "rotate-tool",
- ["End"] = "end-of-line",
- ["Enter"] = "enter",
- ["Esc"] = "escape",
- ["F"] = "frame-selection",
- ["F1"] = "documentation",
- ["F10"] = "step-over",
- ["F11"] = "step-into",
- ["F2"] = "rename",
- ["F5"] = "start-debugger",
- ["F5"] = "continue",
- ["F6"] = "toggle-pane-left",
- ["F7"] = "toggle-pane-bottom",
- ["F8"] = "toggle-pane-right",
- ["F9"] = "toggle-breakpoint",
- ["Home"] = "beginning-of-line-text",
- ["Left"] = "left",
- ["Page Down"] = "page-down",
- ["Page Up"] = "page-up",
- ["Period"] = "realign-camera",
- ["R"] = "scale-tool",
- ["Right"] = "right",
- ["Shift+A"] = "add-secondary",
- ["Shift+Ctrl+B"] = "rebuild",
- ["Shift+Ctrl+Delete"] = "delete-to-end-of-line",
- ["Shift+Ctrl+E"] = "show-last-hidden",
- ["Shift+Ctrl+End"] = "select-end-of-file",
- ["Shift+Ctrl+F"] = "search-in-files",
- ["Shift+Ctrl+G"] = "find-prev",
- ["Shift+Ctrl+H"] = "replace-next",
- ["Shift+Ctrl+Home"] = "select-beginning-of-file",
- ["Shift+Ctrl+I"] = "toggle-visibility-filters",
- ["Shift+Ctrl+L"] = "split-selection-into-lines",
- ["Shift+Ctrl+Left"] = "select-prev-word",
- ["Shift+Ctrl+R"] = "open-asset",
- ["Shift+Ctrl+Right"] = "select-next-word",
- ["Shift+Ctrl+W"] = "close-all",
- ["Shift+Ctrl+Z"] = "redo",
- ["Shift+Down"] = "down-major",
- ["Shift+Down"] = "select-down",
- ["Shift+E"] = "erase-tool",
- ["Shift+End"] = "select-end-of-line",
- ["Shift+F11"] = "step-out",
- ["Shift+F5"] = "stop-debugger",
- ["Shift+Home"] = "select-beginning-of-line-text",
- ["Shift+Left"] = "left-major",
- ["Shift+Left"] = "select-left",
- ["Shift+Page Down"] = "select-page-down",
- ["Shift+Page Up"] = "select-page-up",
- ["Shift+Right"] = "right-major",
- ["Shift+Right"] = "select-right",
- ["Shift+Tab"] = "backwards-tab-trigger",
- ["Shift+Up"] = "select-up",
- ["Shift+Up"] = "up-major",
- ["Space"] = "scene-play",
- ["Space"] = "show-palette",
- ["Tab"] = "tab",
- ["Up"] = "up",
- ["W"] = "move-tool",
- }
- }
- local function fix_binding(binding)
- if not binding then return "" end
- binding = binding:gsub("Meta", "Cmd")
- binding = "<kbd>" .. binding .. "</kbd>"
- binding = binding:gsub("+", "</kbd>+<kbd>")
- return binding
- end
- local commands = {}
- for os,keymap in pairs(keymaps) do
- for keybinding,command in pairs(keymap) do
- commands[command] = commands[command] or {}
- commands[command][os] = keybinding
- end
- end
- local sorted_commands = {}
- for command,bindings in pairs(commands) do
- bindings.command = command
- sorted_commands[#sorted_commands + 1] = bindings
- end
- table.sort(sorted_commands, function(a, b)
- return a.command < b.command
- end)
- print("| Command | Windows | macOS | Linux |")
- print("|---------|---------|-------|-------|")
- for _,bindings in ipairs(sorted_commands) do
- local command = bindings.command
- command = command:gsub("-", " ")
- command = command:sub(1,1):upper() .. command:sub(2)
- local win32 = fix_binding(bindings.win32)
- local darwin = fix_binding(bindings.darwin)
- local linux = fix_binding(bindings.linux)
- print(("| %s | %s | %s | %s |"):format(command, win32, darwin, linux))
- end
|