Fix macOS keymap

This commit is contained in:
Timofffee 2021-08-30 16:21:16 +04:00
parent e9246bcb56
commit 6e5452844c
1 changed files with 20 additions and 14 deletions

View File

@ -52,12 +52,14 @@ local function keymap_macos(keymap)
["shift+tab"] = "doc:unindent",
["backspace"] = "doc:backspace",
["shift+backspace"] = "doc:backspace",
["cmd+backspace"] = "doc:delete-to-previous-word-start",
["option+backspace"] = "doc:delete-to-previous-word-start",
["cmd+shift+backspace"] = "doc:delete-to-previous-word-start",
["cmd+backspace"] = "doc:delete-to-start-of-indentation",
["delete"] = "doc:delete",
["shift+delete"] = "doc:delete",
["cmd+delete"] = "doc:delete-to-next-word-end",
["option+delete"] = "doc:delete-to-next-word-end",
["cmd+shift+delete"] = "doc:delete-to-next-word-end",
["cmd+delete"] = "doc:delete-to-end-of-line",
["return"] = { "command:submit", "doc:newline", "dialog:select" },
["keypad enter"] = { "command:submit", "doc:newline", "dialog:select" },
["cmd+return"] = "doc:newline-below",
@ -67,8 +69,8 @@ local function keymap_macos(keymap)
["cmd+d"] = { "find-replace:select-next", "doc:select-word" },
["cmd+l"] = "doc:select-lines",
["cmd+/"] = "doc:toggle-line-comments",
["cmd+up"] = "doc:move-lines-up",
["cmd+down"] = "doc:move-lines-down",
["option+up"] = "doc:move-lines-up",
["option+down"] = "doc:move-lines-down",
["cmd+shift+d"] = "doc:duplicate-lines",
["cmd+shift+k"] = "doc:delete-lines",
@ -76,14 +78,16 @@ local function keymap_macos(keymap)
["right"] = { "doc:move-to-next-char", "dialog:next-entry"},
["up"] = { "command:select-previous", "doc:move-to-previous-line" },
["down"] = { "command:select-next", "doc:move-to-next-line" },
["cmd+left"] = "doc:move-to-previous-word-start",
["cmd+right"] = "doc:move-to-next-word-end",
["option+left"] = "doc:move-to-previous-word-start",
["option+right"] = "doc:move-to-next-word-end",
["cmd+left"] = "doc:move-to-start-of-indentation",
["cmd+right"] = "doc:move-to-end-of-line",
["cmd+["] = "doc:move-to-previous-block-start",
["cmd+]"] = "doc:move-to-next-block-end",
["home"] = "doc:move-to-start-of-indentation",
["end"] = "doc:move-to-end-of-line",
["cmd+home"] = "doc:move-to-start-of-doc",
["cmd+end"] = "doc:move-to-end-of-doc",
["cmd+up"] = "doc:move-to-start-of-doc",
["cmd+down"] = "doc:move-to-end-of-doc",
["pageup"] = "doc:move-to-previous-page",
["pagedown"] = "doc:move-to-next-page",
@ -91,18 +95,20 @@ local function keymap_macos(keymap)
["shift+right"] = "doc:select-to-next-char",
["shift+up"] = "doc:select-to-previous-line",
["shift+down"] = "doc:select-to-next-line",
["cmd+shift+left"] = "doc:select-to-previous-word-start",
["cmd+shift+right"] = "doc:select-to-next-word-end",
["option+shift+left"] = "doc:select-to-previous-word-start",
["option+shift+right"] = "doc:select-to-next-word-end",
["cmd+shift+left"] = "doc:select-to-start-of-indentation",
["cmd+shift+right"] = "doc:select-to-end-of-line",
["cmd+shift+["] = "doc:select-to-previous-block-start",
["cmd+shift+]"] = "doc:select-to-next-block-end",
["shift+home"] = "doc:select-to-start-of-indentation",
["shift+end"] = "doc:select-to-end-of-line",
["cmd+shift+home"] = "doc:select-to-start-of-doc",
["cmd+shift+end"] = "doc:select-to-end-of-doc",
["cmd+shift+up"] = "doc:select-to-start-of-doc",
["cmd+shift+down"] = "doc:select-to-end-of-doc",
["shift+pageup"] = "doc:select-to-previous-page",
["shift+pagedown"] = "doc:select-to-next-page",
["cmd+shift+up"] = "doc:create-cursor-previous-line",
["cmd+shift+down"] = "doc:create-cursor-next-line"
["cmd+option+up"] = "doc:create-cursor-previous-line",
["cmd+option+down"] = "doc:create-cursor-next-line"
}
end