Re: Edit Undo Keystroke Mapping
Stephen Cumminger <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
I figured this out and wanted to share with others.
I added the below to my layer.xml file. My assumption that the NetBeans
RCP app creation has this by default (since it is in the IDE) and that I
must be doing something wrong, was incorrect. Adding this allows the
Undo/Redo functionality to work properly with the control keys, plus it
adds the key sequence to the Edit menu; which I was also looking for.
<folder name="Shortcuts">
<file name="D-Z.shadow">
<attr name="originalFile"
stringvalue="Actions/Edit/org-openide-actions-UndoAction.instance"/>
</file>
<file name="D-Y.shadow">
<attr name="originalFile"
stringvalue="Actions/Edit/org-openide-actions-RedoAction.instance"/>
</file>
</folder>
Stephen
On 29/12/2016 9:06 PM, [email protected] wrote:
> I am developing with NetBeans 8.02 RCP app and have a peculiar problem
> with my Undo/Redo implementation. The functionality is working
> properly, except I can't seem to get the shortcut keys CNTL-Z and
> CNTL-Y for undo/redo working properly or appearing in the Edit Main
> Menu Action item.
>
> I am using NetBean's UNDO.Manager implementation in just one
> TopComponent at this time. Toolbar buttons and the Edit->Undo/Redo menu
> actions do all work as expected. There are no over-rides in the
> layer.xml file for any module that I can see that would impact this.
>
> Does anyone have ideas of where I can check next? I started adding
> different libraries at the project level in the editor sections, but I
> really don't know which ones may even be related to the Undo
> functionality.
>