OSDN Git Service

ショートカットキーによるコピー(カット)&ペースト操作も操作履歴として取得可能にした
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / gui / ContentView.java
index 6e0f337..3655adf 100644 (file)
@@ -330,6 +330,21 @@ public class ContentView extends QWebView {
                        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