macEditingCommands.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.macEditingCommands = void 0;
  6. /**
  7. * Copyright 2017 Google Inc. All rights reserved.
  8. * Modifications copyright (c) Microsoft Corporation.
  9. *
  10. * Licensed under the Apache License, Version 2.0 (the 'License');
  11. * you may not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an 'AS IS' BASIS,
  18. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. */
  22. const macEditingCommands = exports.macEditingCommands = {
  23. 'Backspace': 'deleteBackward:',
  24. 'Enter': 'insertNewline:',
  25. 'NumpadEnter': 'insertNewline:',
  26. 'Escape': 'cancelOperation:',
  27. 'ArrowUp': 'moveUp:',
  28. 'ArrowDown': 'moveDown:',
  29. 'ArrowLeft': 'moveLeft:',
  30. 'ArrowRight': 'moveRight:',
  31. 'F5': 'complete:',
  32. 'Delete': 'deleteForward:',
  33. 'Home': 'scrollToBeginningOfDocument:',
  34. 'End': 'scrollToEndOfDocument:',
  35. 'PageUp': 'scrollPageUp:',
  36. 'PageDown': 'scrollPageDown:',
  37. 'Shift+Backspace': 'deleteBackward:',
  38. 'Shift+Enter': 'insertNewline:',
  39. 'Shift+NumpadEnter': 'insertNewline:',
  40. 'Shift+Escape': 'cancelOperation:',
  41. 'Shift+ArrowUp': 'moveUpAndModifySelection:',
  42. 'Shift+ArrowDown': 'moveDownAndModifySelection:',
  43. 'Shift+ArrowLeft': 'moveLeftAndModifySelection:',
  44. 'Shift+ArrowRight': 'moveRightAndModifySelection:',
  45. 'Shift+F5': 'complete:',
  46. 'Shift+Delete': 'deleteForward:',
  47. 'Shift+Home': 'moveToBeginningOfDocumentAndModifySelection:',
  48. 'Shift+End': 'moveToEndOfDocumentAndModifySelection:',
  49. 'Shift+PageUp': 'pageUpAndModifySelection:',
  50. 'Shift+PageDown': 'pageDownAndModifySelection:',
  51. 'Shift+Numpad5': 'delete:',
  52. 'Control+Tab': 'selectNextKeyView:',
  53. 'Control+Enter': 'insertLineBreak:',
  54. 'Control+NumpadEnter': 'insertLineBreak:',
  55. 'Control+Quote': 'insertSingleQuoteIgnoringSubstitution:',
  56. 'Control+KeyA': 'moveToBeginningOfParagraph:',
  57. 'Control+KeyB': 'moveBackward:',
  58. 'Control+KeyD': 'deleteForward:',
  59. 'Control+KeyE': 'moveToEndOfParagraph:',
  60. 'Control+KeyF': 'moveForward:',
  61. 'Control+KeyH': 'deleteBackward:',
  62. 'Control+KeyK': 'deleteToEndOfParagraph:',
  63. 'Control+KeyL': 'centerSelectionInVisibleArea:',
  64. 'Control+KeyN': 'moveDown:',
  65. 'Control+KeyO': ['insertNewlineIgnoringFieldEditor:', 'moveBackward:'],
  66. 'Control+KeyP': 'moveUp:',
  67. 'Control+KeyT': 'transpose:',
  68. 'Control+KeyV': 'pageDown:',
  69. 'Control+KeyY': 'yank:',
  70. 'Control+Backspace': 'deleteBackwardByDecomposingPreviousCharacter:',
  71. 'Control+ArrowUp': 'scrollPageUp:',
  72. 'Control+ArrowDown': 'scrollPageDown:',
  73. 'Control+ArrowLeft': 'moveToLeftEndOfLine:',
  74. 'Control+ArrowRight': 'moveToRightEndOfLine:',
  75. 'Shift+Control+Enter': 'insertLineBreak:',
  76. 'Shift+Control+NumpadEnter': 'insertLineBreak:',
  77. 'Shift+Control+Tab': 'selectPreviousKeyView:',
  78. 'Shift+Control+Quote': 'insertDoubleQuoteIgnoringSubstitution:',
  79. 'Shift+Control+KeyA': 'moveToBeginningOfParagraphAndModifySelection:',
  80. 'Shift+Control+KeyB': 'moveBackwardAndModifySelection:',
  81. 'Shift+Control+KeyE': 'moveToEndOfParagraphAndModifySelection:',
  82. 'Shift+Control+KeyF': 'moveForwardAndModifySelection:',
  83. 'Shift+Control+KeyN': 'moveDownAndModifySelection:',
  84. 'Shift+Control+KeyP': 'moveUpAndModifySelection:',
  85. 'Shift+Control+KeyV': 'pageDownAndModifySelection:',
  86. 'Shift+Control+Backspace': 'deleteBackwardByDecomposingPreviousCharacter:',
  87. 'Shift+Control+ArrowUp': 'scrollPageUp:',
  88. 'Shift+Control+ArrowDown': 'scrollPageDown:',
  89. 'Shift+Control+ArrowLeft': 'moveToLeftEndOfLineAndModifySelection:',
  90. 'Shift+Control+ArrowRight': 'moveToRightEndOfLineAndModifySelection:',
  91. 'Alt+Backspace': 'deleteWordBackward:',
  92. 'Alt+Enter': 'insertNewlineIgnoringFieldEditor:',
  93. 'Alt+NumpadEnter': 'insertNewlineIgnoringFieldEditor:',
  94. 'Alt+Escape': 'complete:',
  95. 'Alt+ArrowUp': ['moveBackward:', 'moveToBeginningOfParagraph:'],
  96. 'Alt+ArrowDown': ['moveForward:', 'moveToEndOfParagraph:'],
  97. 'Alt+ArrowLeft': 'moveWordLeft:',
  98. 'Alt+ArrowRight': 'moveWordRight:',
  99. 'Alt+Delete': 'deleteWordForward:',
  100. 'Alt+PageUp': 'pageUp:',
  101. 'Alt+PageDown': 'pageDown:',
  102. 'Shift+Alt+Backspace': 'deleteWordBackward:',
  103. 'Shift+Alt+Enter': 'insertNewlineIgnoringFieldEditor:',
  104. 'Shift+Alt+NumpadEnter': 'insertNewlineIgnoringFieldEditor:',
  105. 'Shift+Alt+Escape': 'complete:',
  106. 'Shift+Alt+ArrowUp': 'moveParagraphBackwardAndModifySelection:',
  107. 'Shift+Alt+ArrowDown': 'moveParagraphForwardAndModifySelection:',
  108. 'Shift+Alt+ArrowLeft': 'moveWordLeftAndModifySelection:',
  109. 'Shift+Alt+ArrowRight': 'moveWordRightAndModifySelection:',
  110. 'Shift+Alt+Delete': 'deleteWordForward:',
  111. 'Shift+Alt+PageUp': 'pageUp:',
  112. 'Shift+Alt+PageDown': 'pageDown:',
  113. 'Control+Alt+KeyB': 'moveWordBackward:',
  114. 'Control+Alt+KeyF': 'moveWordForward:',
  115. 'Control+Alt+Backspace': 'deleteWordBackward:',
  116. 'Shift+Control+Alt+KeyB': 'moveWordBackwardAndModifySelection:',
  117. 'Shift+Control+Alt+KeyF': 'moveWordForwardAndModifySelection:',
  118. 'Shift+Control+Alt+Backspace': 'deleteWordBackward:',
  119. 'Meta+NumpadSubtract': 'cancel:',
  120. 'Meta+Backspace': 'deleteToBeginningOfLine:',
  121. 'Meta+ArrowUp': 'moveToBeginningOfDocument:',
  122. 'Meta+ArrowDown': 'moveToEndOfDocument:',
  123. 'Meta+ArrowLeft': 'moveToLeftEndOfLine:',
  124. 'Meta+ArrowRight': 'moveToRightEndOfLine:',
  125. 'Shift+Meta+NumpadSubtract': 'cancel:',
  126. 'Shift+Meta+Backspace': 'deleteToBeginningOfLine:',
  127. 'Shift+Meta+ArrowUp': 'moveToBeginningOfDocumentAndModifySelection:',
  128. 'Shift+Meta+ArrowDown': 'moveToEndOfDocumentAndModifySelection:',
  129. 'Shift+Meta+ArrowLeft': 'moveToLeftEndOfLineAndModifySelection:',
  130. 'Shift+Meta+ArrowRight': 'moveToRightEndOfLineAndModifySelection:',
  131. 'Meta+KeyA': 'selectAll:',
  132. 'Meta+KeyC': 'copy:',
  133. 'Meta+KeyX': 'cut:',
  134. 'Meta+KeyV': 'paste:',
  135. 'Meta+KeyZ': 'undo:',
  136. 'Shift+Meta+KeyZ': 'redo:'
  137. };