473 QKeySequence(QCoreApplication.translate("ViewManager", "Backspace")), |
473 QKeySequence(QCoreApplication.translate("ViewManager", "Backspace")), |
474 0, |
474 0, |
475 self.editorActGrp, |
475 self.editorActGrp, |
476 "vm_edit_delete_previous_char", |
476 "vm_edit_delete_previous_char", |
477 ) |
477 ) |
478 if OSUtilities.isMacPlatform()(): |
478 if OSUtilities.isMacPlatform(): |
479 act.setAlternateShortcut( |
479 act.setAlternateShortcut( |
480 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+H")) |
480 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+H")) |
481 ) |
481 ) |
482 else: |
482 else: |
483 act.setAlternateShortcut( |
483 act.setAlternateShortcut( |
495 QKeySequence(QCoreApplication.translate("ViewManager", "Del")), |
495 QKeySequence(QCoreApplication.translate("ViewManager", "Del")), |
496 0, |
496 0, |
497 self.editorActGrp, |
497 self.editorActGrp, |
498 "vm_edit_delete_current_char", |
498 "vm_edit_delete_current_char", |
499 ) |
499 ) |
500 if OSUtilities.isMacPlatform()(): |
500 if OSUtilities.isMacPlatform(): |
501 act.setAlternateShortcut( |
501 act.setAlternateShortcut( |
502 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+D")) |
502 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+D")) |
503 ) |
503 ) |
504 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
504 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) |
505 act.triggered.connect(self.esm.map) |
505 act.triggered.connect(self.esm.map) |
572 0, |
572 0, |
573 self.editorActGrp, |
573 self.editorActGrp, |
574 "vm_edit_move_left_char", |
574 "vm_edit_move_left_char", |
575 ) |
575 ) |
576 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
576 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) |
577 if OSUtilities.isMacPlatform()(): |
577 if OSUtilities.isMacPlatform(): |
578 act.setAlternateShortcut( |
578 act.setAlternateShortcut( |
579 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+B")) |
579 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+B")) |
580 ) |
580 ) |
581 act.triggered.connect(self.esm.map) |
581 act.triggered.connect(self.esm.map) |
582 self.editActions.append(act) |
582 self.editActions.append(act) |
587 QKeySequence(QCoreApplication.translate("ViewManager", "Right")), |
587 QKeySequence(QCoreApplication.translate("ViewManager", "Right")), |
588 0, |
588 0, |
589 self.editorActGrp, |
589 self.editorActGrp, |
590 "vm_edit_move_right_char", |
590 "vm_edit_move_right_char", |
591 ) |
591 ) |
592 if OSUtilities.isMacPlatform()(): |
592 if OSUtilities.isMacPlatform(): |
593 act.setAlternateShortcut( |
593 act.setAlternateShortcut( |
594 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+F")) |
594 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+F")) |
595 ) |
595 ) |
596 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
596 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) |
597 act.triggered.connect(self.esm.map) |
597 act.triggered.connect(self.esm.map) |
623 0, |
623 0, |
624 0, |
624 0, |
625 self.editorActGrp, |
625 self.editorActGrp, |
626 "vm_edit_move_right_word", |
626 "vm_edit_move_right_word", |
627 ) |
627 ) |
628 if not OSUtilities.isMacPlatform()(): |
628 if not OSUtilities.isMacPlatform(): |
629 act.setShortcut( |
629 act.setShortcut( |
630 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Right")) |
630 QKeySequence(QCoreApplication.translate("ViewManager", "Ctrl+Right")) |
631 ) |
631 ) |
632 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
632 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) |
633 act.triggered.connect(self.esm.map) |
633 act.triggered.connect(self.esm.map) |
643 0, |
643 0, |
644 0, |
644 0, |
645 self.editorActGrp, |
645 self.editorActGrp, |
646 "vm_edit_move_first_visible_char", |
646 "vm_edit_move_first_visible_char", |
647 ) |
647 ) |
648 if not OSUtilities.isMacPlatform()(): |
648 if not OSUtilities.isMacPlatform(): |
649 act.setShortcut( |
649 act.setShortcut( |
650 QKeySequence(QCoreApplication.translate("ViewManager", "Home")) |
650 QKeySequence(QCoreApplication.translate("ViewManager", "Home")) |
651 ) |
651 ) |
652 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
652 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) |
653 act.triggered.connect(self.esm.map) |
653 act.triggered.connect(self.esm.map) |
679 QKeySequence(QCoreApplication.translate("ViewManager", "Up")), |
679 QKeySequence(QCoreApplication.translate("ViewManager", "Up")), |
680 0, |
680 0, |
681 self.editorActGrp, |
681 self.editorActGrp, |
682 "vm_edit_move_up_line", |
682 "vm_edit_move_up_line", |
683 ) |
683 ) |
684 if OSUtilities.isMacPlatform()(): |
684 if OSUtilities.isMacPlatform(): |
685 act.setAlternateShortcut( |
685 act.setAlternateShortcut( |
686 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+P")) |
686 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+P")) |
687 ) |
687 ) |
688 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
688 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) |
689 act.triggered.connect(self.esm.map) |
689 act.triggered.connect(self.esm.map) |
695 QKeySequence(QCoreApplication.translate("ViewManager", "Down")), |
695 QKeySequence(QCoreApplication.translate("ViewManager", "Down")), |
696 0, |
696 0, |
697 self.editorActGrp, |
697 self.editorActGrp, |
698 "vm_edit_move_down_line", |
698 "vm_edit_move_down_line", |
699 ) |
699 ) |
700 if OSUtilities.isMacPlatform()(): |
700 if OSUtilities.isMacPlatform(): |
701 act.setAlternateShortcut( |
701 act.setAlternateShortcut( |
702 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+N")) |
702 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+N")) |
703 ) |
703 ) |
704 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
704 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) |
705 act.triggered.connect(self.esm.map) |
705 act.triggered.connect(self.esm.map) |
747 QKeySequence(QCoreApplication.translate("ViewManager", "PgDown")), |
747 QKeySequence(QCoreApplication.translate("ViewManager", "PgDown")), |
748 0, |
748 0, |
749 self.editorActGrp, |
749 self.editorActGrp, |
750 "vm_edit_move_down_page", |
750 "vm_edit_move_down_page", |
751 ) |
751 ) |
752 if OSUtilities.isMacPlatform()(): |
752 if OSUtilities.isMacPlatform(): |
753 act.setAlternateShortcut( |
753 act.setAlternateShortcut( |
754 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+V")) |
754 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+V")) |
755 ) |
755 ) |
756 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
756 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) |
757 act.triggered.connect(self.esm.map) |
757 act.triggered.connect(self.esm.map) |
779 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Left")), |
779 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Left")), |
780 0, |
780 0, |
781 self.editorActGrp, |
781 self.editorActGrp, |
782 "vm_edit_extend_selection_left_char", |
782 "vm_edit_extend_selection_left_char", |
783 ) |
783 ) |
784 if OSUtilities.isMacPlatform()(): |
784 if OSUtilities.isMacPlatform(): |
785 act.setAlternateShortcut( |
785 act.setAlternateShortcut( |
786 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+B")) |
786 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+B")) |
787 ) |
787 ) |
788 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
788 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) |
789 act.triggered.connect(self.esm.map) |
789 act.triggered.connect(self.esm.map) |
799 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Right")), |
799 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Right")), |
800 0, |
800 0, |
801 self.editorActGrp, |
801 self.editorActGrp, |
802 "vm_edit_extend_selection_right_char", |
802 "vm_edit_extend_selection_right_char", |
803 ) |
803 ) |
804 if OSUtilities.isMacPlatform()(): |
804 if OSUtilities.isMacPlatform(): |
805 act.setAlternateShortcut( |
805 act.setAlternateShortcut( |
806 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+F")) |
806 QKeySequence(QCoreApplication.translate("ViewManager", "Meta+Shift+F")) |
807 ) |
807 ) |
808 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
808 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) |
809 act.triggered.connect(self.esm.map) |
809 act.triggered.connect(self.esm.map) |
873 0, |
873 0, |
874 0, |
874 0, |
875 self.editorActGrp, |
875 self.editorActGrp, |
876 "vm_edit_extend_selection_first_visible_char", |
876 "vm_edit_extend_selection_first_visible_char", |
877 ) |
877 ) |
878 if not OSUtilities.isMacPlatform()(): |
878 if not OSUtilities.isMacPlatform(): |
879 act.setShortcut( |
879 act.setShortcut( |
880 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Home")) |
880 QKeySequence(QCoreApplication.translate("ViewManager", "Shift+Home")) |
881 ) |
881 ) |
882 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
882 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) |
883 act.triggered.connect(self.esm.map) |
883 act.triggered.connect(self.esm.map) |