Преглед на файлове

compdfkit(win) - 文字编辑补充Ctrl+Shift 组合快捷键

liyuxuan преди 1 година
родител
ревизия
6937bc6eb7
променени са 2 файла, в които са добавени 55 реда и са изтрити 1 реда
  1. 27 0
      Demo/Examples/ContentEditor/MainWindow.xaml.cs
  2. 28 1
      Demo/Examples/PDFViewer/MainPage.xaml.cs

+ 27 - 0
Demo/Examples/ContentEditor/MainWindow.xaml.cs

@@ -1281,6 +1281,33 @@ namespace ContentEditor
                     e.Handled = true;
                 }
             }
+
+            if (Keyboard.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift))
+            {
+                if (e.Key == Key.Left)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypePreWord, true);
+                    e.Handled = true;
+                }
+
+                if (e.Key == Key.Right)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypeNextWord, true);
+                    e.Handled = true;
+                }
+
+                if (e.Key == Key.Up)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypeSectionBegin, true);
+                    e.Handled = true;
+                }
+
+                if (e.Key == Key.Down)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypeSectionEnd, true);
+                    e.Handled = true;
+                }
+            }
         }
         #endregion
 

+ 28 - 1
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -992,7 +992,7 @@ namespace PDFViewer
         }
 
         public void OpenFile()
-        { 
+        {
             string filePath = CommonHelper.GetFilePathOrEmpty();
             string oldFilePath = pdfViewControl.PDFView.Document.FilePath;
 
@@ -1479,6 +1479,33 @@ namespace PDFViewer
                     e.Handled = true;
                 }
             }
+
+            if (Keyboard.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift))
+            {
+                if (e.Key == Key.Left)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypePreWord, true);
+                    e.Handled = true;
+                }
+
+                if (e.Key == Key.Right)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypeNextWord, true);
+                    e.Handled = true;
+                }
+
+                if (e.Key == Key.Up)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypeSectionBegin, true);
+                    e.Handled = true;
+                }
+
+                if (e.Key == Key.Down)
+                {
+                    pdfViewControl.PDFView.JumpEditingLoction(CEditingLocation.CEditingLoadTypeSectionEnd, true);
+                    e.Handled = true;
+                }
+            }
         }
         #endregion