}
// Listener for when cut is clicked
- @SuppressWarnings("unused")
- private void cutClicked() {
+ public void cutClicked() {
cbObserver.setCopySourceGuid(currentNote.getGuid(), browser.page().selectedText());
browser.page().triggerAction(WebAction.Cut);
}
// Listener when COPY is clicked
- @SuppressWarnings("unused")
- private void copyClicked() {
+ public void copyClicked() {
cbObserver.setCopySourceGuid(currentNote.getGuid(), browser.page().selectedText());
browser.page().triggerAction(WebAction.Copy);
e.accept();\r
return;\r
}\r
+ \r
+ // This is done to capture the operation of cutting by shortcut keys\r
+ if (e.matches(StandardKey.Cut)) {\r
+ parent.cutClicked();\r
+ e.accept();\r
+ return;\r
+ }\r
+ \r
+ // This is done to capture the operation of copying by shortcut keys\r
+ if (e.matches(StandardKey.Copy)) {\r
+ parent.copyClicked();\r
+ e.accept();\r
+ return;\r
+ }\r
+ \r
super.keyPressEvent(e);\r
}\r
\r