< prev index next >

src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java

Print this page


   1 /*
   2  * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  50 
  51     static final String upMultilineAction = "aqua-move-up";
  52     static final String downMultilineAction = "aqua-move-down";
  53     static final String pageUpMultiline = "aqua-page-up";
  54     static final String pageDownMultiline = "aqua-page-down";
  55 
  56     final String[] commonTextEditorBindings = {
  57         "ENTER", JTextField.notifyAction,
  58         "COPY", DefaultEditorKit.copyAction,
  59         "CUT", DefaultEditorKit.cutAction,
  60         "PASTE", DefaultEditorKit.pasteAction,
  61         "meta A", DefaultEditorKit.selectAllAction,
  62         "meta C", DefaultEditorKit.copyAction,
  63         "meta V", DefaultEditorKit.pasteAction,
  64         "meta X", DefaultEditorKit.cutAction,
  65         "meta BACK_SLASH", "unselect",
  66 
  67         "DELETE", DefaultEditorKit.deleteNextCharAction,
  68         "alt DELETE", "delete-next-word",
  69         "BACK_SPACE", DefaultEditorKit.deletePrevCharAction,
  70         "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction,
  71         "alt BACK_SPACE", "delete-previous-word",
  72 
  73         "LEFT", DefaultEditorKit.backwardAction,
  74         "KP_LEFT", DefaultEditorKit.backwardAction,
  75         "RIGHT", DefaultEditorKit.forwardAction,
  76         "KP_RIGHT", DefaultEditorKit.forwardAction,
  77         "shift LEFT", DefaultEditorKit.selectionBackwardAction,
  78         "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction,
  79         "shift RIGHT", DefaultEditorKit.selectionForwardAction,
  80         "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction,
  81         "meta LEFT", DefaultEditorKit.beginLineAction,
  82         "meta KP_LEFT", DefaultEditorKit.beginLineAction,
  83         "meta RIGHT", DefaultEditorKit.endLineAction,
  84         "meta KP_RIGHT", DefaultEditorKit.endLineAction,
  85         "shift meta LEFT", DefaultEditorKit.selectionBeginLineAction,
  86         "shift meta KP_LEFT", DefaultEditorKit.selectionBeginLineAction,
  87         "shift meta RIGHT", DefaultEditorKit.selectionEndLineAction,
  88         "shift meta KP_RIGHT", DefaultEditorKit.selectionEndLineAction,
  89         "alt LEFT", DefaultEditorKit.previousWordAction,
  90         "alt KP_LEFT", DefaultEditorKit.previousWordAction,


   1 /*
   2  * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  50 
  51     static final String upMultilineAction = "aqua-move-up";
  52     static final String downMultilineAction = "aqua-move-down";
  53     static final String pageUpMultiline = "aqua-page-up";
  54     static final String pageDownMultiline = "aqua-page-down";
  55 
  56     final String[] commonTextEditorBindings = {
  57         "ENTER", JTextField.notifyAction,
  58         "COPY", DefaultEditorKit.copyAction,
  59         "CUT", DefaultEditorKit.cutAction,
  60         "PASTE", DefaultEditorKit.pasteAction,
  61         "meta A", DefaultEditorKit.selectAllAction,
  62         "meta C", DefaultEditorKit.copyAction,
  63         "meta V", DefaultEditorKit.pasteAction,
  64         "meta X", DefaultEditorKit.cutAction,
  65         "meta BACK_SLASH", "unselect",
  66 
  67         "DELETE", DefaultEditorKit.deleteNextCharAction,
  68         "alt DELETE", "delete-next-word",
  69         "BACK_SPACE", DefaultEditorKit.deletePrevCharAction,

  70         "alt BACK_SPACE", "delete-previous-word",
  71 
  72         "LEFT", DefaultEditorKit.backwardAction,
  73         "KP_LEFT", DefaultEditorKit.backwardAction,
  74         "RIGHT", DefaultEditorKit.forwardAction,
  75         "KP_RIGHT", DefaultEditorKit.forwardAction,
  76         "shift LEFT", DefaultEditorKit.selectionBackwardAction,
  77         "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction,
  78         "shift RIGHT", DefaultEditorKit.selectionForwardAction,
  79         "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction,
  80         "meta LEFT", DefaultEditorKit.beginLineAction,
  81         "meta KP_LEFT", DefaultEditorKit.beginLineAction,
  82         "meta RIGHT", DefaultEditorKit.endLineAction,
  83         "meta KP_RIGHT", DefaultEditorKit.endLineAction,
  84         "shift meta LEFT", DefaultEditorKit.selectionBeginLineAction,
  85         "shift meta KP_LEFT", DefaultEditorKit.selectionBeginLineAction,
  86         "shift meta RIGHT", DefaultEditorKit.selectionEndLineAction,
  87         "shift meta KP_RIGHT", DefaultEditorKit.selectionEndLineAction,
  88         "alt LEFT", DefaultEditorKit.previousWordAction,
  89         "alt KP_LEFT", DefaultEditorKit.previousWordAction,


< prev index next >