Browse Source

【编辑】图像裁剪模式下,点击enter要支持完成裁剪

lizhe 1 year ago
parent
commit
3d044b79be

+ 7 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -1782,7 +1782,7 @@ import Cocoa
         let command = theEvent.modifierFlags.contains(.command)
         let control = theEvent.modifierFlags.contains(.control)
 
-//        KMPrint(theEvent.keyCode)
+        KMPrint(theEvent.keyCode)
         if (theEvent.keyCode == 11 && command) { // command + B [添加书签]
             self.menuItemBookMarkClick_add(sender: NSMenuItem())
             return false
@@ -1830,6 +1830,12 @@ import Cocoa
                     return false
                 }
             }
+        } else if (theEvent.keyCode == 36) {
+            if self.listView.annotationType == .addImage || self.listView.annotationType == .addText {
+                if self.listView.isEditImage {
+                    self.menuItemEditingClick_CropImage(sender: NSMenuItem())
+                }
+            }
         }
     
         if theEvent.keyCode == 53 {