protected SubstanceInputMap getMultilineTextComponentFocusInputMap() {
// This is used in EditorPane, TextArea and TextPane. Almost
// all key strokes can be mapped to the same basic actions used in Aqua.
// There are 7 key strokes that use Aqua-specific actions. These
// are mapped to the closest basic actions.
SubstanceInputMap result = new SubstanceInputMap();
result.put("meta C", DefaultEditorKit.copyAction);
result.put("meta V", DefaultEditorKit.pasteAction);
result.put("meta X", DefaultEditorKit.cutAction);
result.put("COPY", DefaultEditorKit.copyAction);
result.put("PASTE", DefaultEditorKit.pasteAction);
result.put("CUT", DefaultEditorKit.cutAction);
result.put("shift LEFT", DefaultEditorKit.selectionBackwardAction);
result.put("shift KP_LEFT", DefaultEditorKit.selectionBackwardAction);
result.put("shift RIGHT", DefaultEditorKit.selectionForwardAction);
result.put("shift KP_RIGHT", DefaultEditorKit.selectionForwardAction);
result.put("alt LEFT", DefaultEditorKit.previousWordAction);
result.put("alt KP_LEFT", DefaultEditorKit.previousWordAction);
result.put("alt RIGHT", DefaultEditorKit.nextWordAction);
result.put("alt KP_RIGHT", DefaultEditorKit.nextWordAction);
result.put("alt shift LEFT",
DefaultEditorKit.selectionPreviousWordAction);
result.put("alt shift KP_LEFT",
DefaultEditorKit.selectionPreviousWordAction);
result.put("alt shift RIGHT", DefaultEditorKit.selectionNextWordAction);
result.put("alt shift KP_RIGHT",
DefaultEditorKit.selectionNextWordAction);
result.put("meta A", DefaultEditorKit.selectAllAction);
result.put("ctrl A", DefaultEditorKit.beginLineAction);
result.put("meta KP_LEFT", DefaultEditorKit.beginLineAction);
result.put("meta LEFT", DefaultEditorKit.beginLineAction);
result.put("ctrl E", DefaultEditorKit.endLineAction);
result.put("meta KP_RIGHT", DefaultEditorKit.endLineAction);
result.put("meta RIGHT", DefaultEditorKit.endLineAction);
result.put("shift meta KP_LEFT",
DefaultEditorKit.selectionBeginLineAction);
result
.put("shift meta LEFT",
DefaultEditorKit.selectionBeginLineAction);
result.put("shift meta KP_RIGHT",
DefaultEditorKit.selectionEndLineAction);
result.put("shift meta RIGHT", DefaultEditorKit.selectionEndLineAction);
result.put("ctrl P", DefaultEditorKit.upAction);
result.put("ctrl N", DefaultEditorKit.downAction);
// XXX: these are actually mapped to aqua-move-up and aqua-move-down
result.put("UP", DefaultEditorKit.upAction);
result.put("KP_UP", DefaultEditorKit.upAction);
result.put("DOWN", DefaultEditorKit.downAction);
result.put("KP_DOWN", DefaultEditorKit.downAction);
// XXX: these are actually mapped to aqua-page-up and aqua-page-down
result.put("PAGE_UP", DefaultEditorKit.pageUpAction);
result.put("PAGE_DOWN", DefaultEditorKit.pageDownAction);
result.put("ctrl V", DefaultEditorKit.pageDownAction);
result.put("shift PAGE_UP", TextComponentActions.SELECTION_PAGE_UP);
result.put("shift PAGE_DOWN", TextComponentActions.SELECTION_PAGE_DOWN);
result.put("meta shift PAGE_UP",
TextComponentActions.SELECTION_PAGE_LEFT);
result.put("meta shift PAGE_DOWN",
TextComponentActions.SELECTION_PAGE_RIGHT);
result.put("shift UP", DefaultEditorKit.selectionUpAction);
result.put("shift KP_UP", DefaultEditorKit.selectionUpAction);
result.put("shift DOWN", DefaultEditorKit.selectionDownAction);
result.put("shift KP_DOWN", DefaultEditorKit.selectionDownAction);
result.put("meta shift KP_UP", DefaultEditorKit.selectionBeginAction);
result.put("meta shift UP", DefaultEditorKit.selectionBeginAction);
result.put("shift HOME", DefaultEditorKit.selectionBeginAction);
result.put("meta shift KP_DOWN", DefaultEditorKit.selectionEndAction);
result.put("meta shift DOWN", DefaultEditorKit.selectionEndAction);
result.put("shift END", DefaultEditorKit.selectionEndAction);
result.put("shift alt KP_UP",
DefaultEditorKit.selectionBeginParagraphAction);
result.put("shift alt UP",
DefaultEditorKit.selectionBeginParagraphAction);
result.put("shift alt KP_DOWN",
DefaultEditorKit.selectionEndParagraphAction);
result.put("shift alt DOWN",
DefaultEditorKit.selectionEndParagraphAction);
result.put("ENTER", DefaultEditorKit.insertBreakAction);
result.put("BACK_SPACE", DefaultEditorKit.deletePrevCharAction);
result.put("ctrl H", DefaultEditorKit.deletePrevCharAction);
result.put("DELETE", DefaultEditorKit.deleteNextCharAction);
result.put("ctrl D", DefaultEditorKit.deleteNextCharAction);
result.put("alt DELETE", DefaultEditorKit.deleteNextWordAction);
result.put("alt BACK_SPACE", DefaultEditorKit.deletePrevWordAction);
result.put("ctrl W", DefaultEditorKit.deletePrevWordAction);
result.put("RIGHT", DefaultEditorKit.forwardAction);
result.put("KP_RIGHT", DefaultEditorKit.forwardAction);
result.put("ctrl F", DefaultEditorKit.forwardAction);
result.put("LEFT", DefaultEditorKit.backwardAction);
result.put("KP_LEFT", DefaultEditorKit.backwardAction);
result.put("ctrl B", DefaultEditorKit.backwardAction);
result.put("TAB", DefaultEditorKit.insertTabAction);
result.put("meta BACK_SLASH", TextComponentActions.UNSELECT);
result.put("meta KP_UP", DefaultEditorKit.beginAction);
result.put("meta UP", DefaultEditorKit.beginAction);
result.put("HOME", DefaultEditorKit.beginAction);
result.put("meta KP_DOWN", DefaultEditorKit.endAction);
result.put("meta DOWN", DefaultEditorKit.endAction);
result.put("END", DefaultEditorKit.endAction);
result.put("meta T", TextComponentActions.NEXT_LINK);
result.put("meta shift T", TextComponentActions.PREVIOUS_LINK);
result.put("meta SPACE", TextComponentActions.ACTIVATE_LINK);
result.put("control shift O",
TextComponentActions.TOGGLE_COMPONENT_ORIENTATION);
return result;
}