added editing commands
This commit is contained in:
@@ -97,7 +97,7 @@
|
|||||||
"allowSamePrecedence": true
|
"allowSamePrecedence": true
|
||||||
}],
|
}],
|
||||||
"no-mixed-spaces-and-tabs": "error",
|
"no-mixed-spaces-and-tabs": "error",
|
||||||
"no-multi-spaces": "error",
|
"no-multi-spaces": "off",
|
||||||
"no-multi-str": "error",
|
"no-multi-str": "error",
|
||||||
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
|
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
|
||||||
"no-negated-in-lhs": "error",
|
"no-negated-in-lhs": "error",
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
"no-template-curly-in-string": "error",
|
"no-template-curly-in-string": "error",
|
||||||
"no-this-before-super": "error",
|
"no-this-before-super": "error",
|
||||||
"no-throw-literal": "error",
|
"no-throw-literal": "error",
|
||||||
"no-trailing-spaces": "error",
|
"no-trailing-spaces": "off",
|
||||||
"no-undef": "off",
|
"no-undef": "off",
|
||||||
"no-undef-init": "error",
|
"no-undef-init": "error",
|
||||||
"no-unexpected-multiline": "error",
|
"no-unexpected-multiline": "error",
|
||||||
|
|||||||
@@ -159,6 +159,30 @@ window.Input = (function () {
|
|||||||
bind('ctrl+^', '\x1e')
|
bind('ctrl+^', '\x1e')
|
||||||
bind('ctrl+_', '\x1f')
|
bind('ctrl+_', '\x1f')
|
||||||
|
|
||||||
|
// extra ctrl-
|
||||||
|
bind('ctrl+left', '\x1f[1;5D')
|
||||||
|
bind('ctrl+right', '\x1f[1;5C')
|
||||||
|
bind('ctrl+up', '\x1f[1;5A')
|
||||||
|
bind('ctrl+down', '\x1f[1;5B')
|
||||||
|
bind('ctrl+home', '\x1f[1;5H')
|
||||||
|
bind('ctrl+end', '\x1f[1;5F')
|
||||||
|
|
||||||
|
// extra shift-
|
||||||
|
bind('shift+left', '\x1f[1;2D')
|
||||||
|
bind('shift+right', '\x1f[1;2C')
|
||||||
|
bind('shift+up', '\x1f[1;2A')
|
||||||
|
bind('shift+down', '\x1f[1;2B')
|
||||||
|
bind('shift+home', '\x1f[1;2H')
|
||||||
|
bind('shift+end', '\x1f[1;2F')
|
||||||
|
|
||||||
|
// macOS editing commands
|
||||||
|
bind('⌥+left', '\x1fb') // ⌥← to go back a word (^[b)
|
||||||
|
bind('⌥+right', '\x1ff') // ⌥→ to go forward one word (^[f)
|
||||||
|
bind('⌘+left', '\x01') // ⌘← to go to the beginning of a line (^A)
|
||||||
|
bind('⌘+right', '\x05') // ⌘→ to go to the end of a line (^E)
|
||||||
|
bind('⌥+backspace', '\x17') // ⌥⌫ to delete a word (^W, I think)
|
||||||
|
bind('⌘+backspace', '\x15') // ⌘⌫ to delete to the beginning of a line (possibly ^U)
|
||||||
|
|
||||||
_bindFnKeys()
|
_bindFnKeys()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user