Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Keymaps/NetBeans55=NetBeans 5.5
Keymaps/NetBeans=NetBeans
Keymaps/Eclipse=Eclipse
Keymaps/Idea=Idea
Keymaps/VSCode=VSCode

# Coloring profile names
Editors/FontsColors/NetBeans55=NetBeans 5.5
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->

<!DOCTYPE bindings PUBLIC "-//NetBeans//DTD Editor KeyBindings settings 1.1//EN" "http://www.netbeans.org/dtds/EditorKeyBindings-1_1.dtd">

<!--
This file modifies keybindings from VSCode-keybindings.xml to make them work on Mac OS.
-->

<bindings>
<!-- Basic editing -->
<bind key="C-X" remove="true"/>
<bind actionName="cut-to-clipboard" key="M-X"/>

<bind key="C-C" remove="true"/>
<bind actionName="copy-to-clipboard" key="M-C"/>

<bind key="C-V" remove="true"/>
<bind actionName="paste-from-clipboard" key="M-V"/>

<bind key="CS-K" remove="true"/>
<bind actionName="remove-line" key="MS-K"/>

<bind key="C-ENTER" remove="true"/>
<bind actionName="start-new-line" key="M-ENTER"/>

<bind key="CS-BACK_SLASH" remove="true"/>
<bind actionName="match-brace" key="MS-BACK_SLASH"/>

<bind key="C-CLOSE_BRACKET" remove="true"/>
<bind actionName="shift-line-right" key="M-CLOSE_BRACKET"/>

<bind key="C-OPEN_BRACKET" remove="true"/>
<bind actionName="shift-line-left" key="M-OPEN_BRACKET"/>

<!-- Go to beginning/end of file differs completely from Windows -->
<bind key="C-HOME" remove="true"/>
<bind actionName="caret-begin" key="M-UP"/>

<bind key="C-END" remove="true"/>
<bind actionName="caret-end" key="M-DOWN"/>

<!-- Scrolling -->
<bind key="C-UP" remove="true"/>
<bind actionName="scroll-up" key="C-PAGE_UP"/>

<bind key="C-DOWN" remove="true"/>
<bind actionName="scroll-down" key="C-PAGE_DOWN"/>

<bind key="A-PAGE_UP" remove="true"/>
<bind actionName="page-up" key="M-PAGE_UP"/>

<bind key="A-PAGE_DOWN" remove="true"/>
<bind actionName="page-down" key="M-PAGE_DOWN"/>

<!-- Comments -->
<bind key="C-K C-C" remove="true"/>
<bind actionName="comment" key="M-K M-C"/>

<bind key="C-K C-U" remove="true"/>
<bind actionName="uncomment" key="M-K M-U"/>

<bind key="C-SLASH" remove="true"/>
<bind actionName="toggle-comment" key="M-SLASH"/>

<!-- Search and navigation -->
<bind key="C-F" remove="true"/>
<bind actionName="find" key="M-F"/>

<bind key="C-H" remove="true"/>
<bind actionName="replace" key="MA-F"/>

<bind key="F3" remove="true"/>
<bind actionName="find-next" key="M-G"/>

<bind key="S-F3" remove="true"/>
<bind actionName="find-previous" key="MS-G"/>

<!-- Go to Line (Ctrl+G) stays the same literal Ctrl key on Mac -->

<!-- Multi-cursor and selection -->
<bind key="C-A" remove="true"/>
<bind actionName="select-all" key="M-A"/>

<bind key="C-D" remove="true"/>
<bind actionName="addCaretSelectNext" key="M-D"/>

<bind key="CS-L" remove="true"/>
<bind actionName="addCaretSelectAll" key="MS-L"/>

<bind key="CA-UP" remove="true"/>
<bind actionName="add-caret-up" key="MA-UP"/>

<bind key="CA-DOWN" remove="true"/>
<bind actionName="add-caret-down" key="MA-DOWN"/>

<bind key="C-U" remove="true"/>
<bind actionName="remove-last-caret" key="M-U"/>

<!-- Editor management -->
<bind key="C-F4" remove="true"/>
<bind actionName="close" key="M-W"/>

<bind key="C-BACK_SLASH" remove="true"/>
<bind actionName="split-editor" key="M-BACK_SLASH"/>

<!-- Rich language features -->
<bind key="C-I" remove="true"/>
<bind actionName="completion-show" key="M-I"/>

<bind key="C-K C-F" remove="true"/>
<bind actionName="format" key="M-K M-F"/>

<bind key="C-K C-X" remove="true"/>
<bind actionName="remove-trailing-spaces" key="M-K M-X"/>
</bindings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->

<!DOCTYPE bindings PUBLIC "-//NetBeans//DTD Editor KeyBindings settings 1.1//EN" "http://www.netbeans.org/dtds/EditorKeyBindings-1_1.dtd">
<bindings>
<!-- Basic editing -->
<bind actionName="cut-to-clipboard" key="C-X"/>
<bind actionName="copy-to-clipboard" key="C-C"/>
<bind actionName="paste-from-clipboard" key="C-V"/>
<bind actionName="move-selection-else-line-up" key="A-UP"/>
<bind actionName="move-selection-else-line-down" key="A-DOWN"/>
<bind actionName="copy-selection-else-line-up" key="SA-UP"/>
<bind actionName="copy-selection-else-line-down" key="SA-DOWN"/>
<bind actionName="remove-line" key="CS-K"/>
<bind actionName="start-new-line" key="C-ENTER"/>
<bind actionName="match-brace" key="CS-BACK_SLASH"/>
<bind actionName="shift-line-right" key="C-CLOSE_BRACKET"/>
<bind actionName="shift-line-left" key="C-OPEN_BRACKET"/>
<bind actionName="caret-begin-line" key="HOME"/>
<bind actionName="caret-end-line" key="END"/>
<bind actionName="caret-begin" key="C-HOME"/>
<bind actionName="caret-end" key="C-END"/>
<bind actionName="scroll-up" key="C-UP"/>
<bind actionName="scroll-down" key="C-DOWN"/>
<bind actionName="page-up" key="A-PAGE_UP"/>
<bind actionName="page-down" key="A-PAGE_DOWN"/>

<!-- Code folding -->
<bind actionName="collapse-fold" key="CS-OPEN_BRACKET"/>
<bind actionName="expand-fold" key="CS-CLOSE_BRACKET"/>
<bind actionName="collapse-all-folds" key="C-K C-OPEN_BRACKET"/>
<bind actionName="expand-all-folds" key="C-K C-CLOSE_BRACKET"/>

<!-- Comments -->
<bind actionName="toggle-comment" key="C-SLASH"/>
<bind actionName="comment" key="C-K C-C"/>
<bind actionName="uncomment" key="C-K C-U"/>

<!-- Search and navigation -->
<bind actionName="find" key="C-F"/>
<bind actionName="replace" key="C-H"/>
<bind actionName="find-next" key="F3"/>
<bind actionName="find-previous" key="S-F3"/>
<bind actionName="goto" key="C-G"/>
<bind actionName="goto-declaration" key="F12"/>
<bind actionName="goto-source" key="A-F12"/>

<!-- Multi-cursor and selection -->
<bind actionName="select-all" key="C-A"/>
<bind actionName="addCaretSelectNext" key="C-D"/>
<bind actionName="addCaretSelectAll" key="CS-L"/>
<bind actionName="add-caret-up" key="CA-UP"/>
<bind actionName="add-caret-down" key="CA-DOWN"/>
<bind actionName="remove-last-caret" key="C-U"/>
<bind actionName="select-element-next" key="SA-RIGHT"/>
<bind actionName="select-element-previous" key="SA-LEFT"/>

<!-- Editor management -->
<bind actionName="close" key="C-F4"/>
<bind actionName="split-editor" key="C-BACK_SLASH"/>

<!-- Rich language features -->
<bind actionName="completion-show" key="C-SPACE"/>
<bind actionName="completion-show" key="C-I"/>
<bind actionName="format" key="SA-F"/>
<bind actionName="format" key="C-K C-F"/>
<bind actionName="organize-imports" key="AS-O"/>
<bind actionName="remove-trailing-spaces" key="C-K C-X"/>
</bindings>
68 changes: 68 additions & 0 deletions ide/defaults/src/org/netbeans/modules/defaults/mf-layer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,66 @@
<attr name="originalFile" stringvalue="Actions/Edit/org-openide-actions-UndoAction.instance"/>
</file>
</folder>
<folder name="VSCode">
<attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.defaults.Bundle"/>
<file name="D-B.shadow">
<attr name="originalFile" stringvalue="Actions/Project/org-netbeans-modules-project-ui-logical-tab-action.instance"/>
</file>
<file name="D-BACK_QUOTE.shadow">
<attr name="originalFile" stringvalue="Actions/Window/ShowTerminalTCAction.instance"/>
</file>
<file name="D-O.shadow">
<attr name="originalFile" stringvalue="Actions/Project/org-netbeans-modules-project-ui-OpenProject.instance"/>
</file>
<file name="D-P.shadow">
<attr name="originalFile" stringvalue="Actions/Tools/org-netbeans-modules-jumpto-file-FileSearchAction.instance"/>
</file>
<file name="D-PERIOD.shadow">
<attr name="originalFile" stringvalue="Actions/Source/org-netbeans-modules-editor-hints-FixAction.instance"/>
</file>
<file name="D-S.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAction.instance"/>
</file>
<file name="DS-E.shadow">
<attr name="originalFile" stringvalue="Actions/Project/org-netbeans-modules-project-ui-logical-tab-action.instance"/>
</file>
<file name="DS-F.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-search-FindInFilesAction.instance"/>
</file>
<file name="DS-H.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-search-ReplaceInFilesAction.instance"/>
</file>
<file name="DS-O.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-jumpto-symbol-GoToSymbol.instance"/>
</file>
<file name="DS-P.shadow">
<attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-quicksearch-QuickSearchAction.instance"/>
</file>
<file name="F2.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-RenameAction.instance"/>
</file>
<file name="F5.shadow">
<attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-DebugMainProjectAction.instance"/>
</file>
<file name="F9.shadow">
<attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-ToggleBreakpointAction.instance"/>
</file>
<file name="F10.shadow">
<attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-StepOverAction.instance"/>
</file>
<file name="F11.shadow">
<attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-StepIntoAction.instance"/>
</file>
<file name="S-F5.shadow">
<attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-KillAction.instance"/>
</file>
<file name="S-F11.shadow">
<attr name="originalFile" stringvalue="Actions/Debug/org-netbeans-modules-debugger-ui-actions-StepOutAction.instance"/>
</file>
<file name="S-F12.shadow">
<attr name="originalFile" stringvalue="Actions/Window/org-netbeans-modules-refactoring-spi-impl-FindUsagesOpenAction.instance"/>
</file>
</folder>
</folder>
<folder name="Editors">

Expand Down Expand Up @@ -1191,6 +1251,14 @@
</file>
</folder>
</folder>
<folder name="VSCode">
<folder name="Defaults">
<file name="org-netbeans-modules-defaults-keybindings.xml" url="VSCode-keybindings.xml"/>
<file name="org-netbeans-modules-editor-keybindings-mac.xml" url="VSCode-keybindings-mac.xml">
<attr name="nbeditor-settings-targetOS" stringvalue="OS_MAC"/>
</file>
</folder>
</folder>
<folder name="NetBeans55">
<folder name="Defaults">
<file name="org-netbeans-modules-defaults-keybindings.xml" url="NetBeans55-keybindings.xml"/>
Expand Down