Some keyboard shortcut tweaks for macOS
This commit is contained in:
@@ -68,9 +68,10 @@ These are as following:
|
||||
":kbd:`Ctrl-B`", "Format selected text, or word under cursor, as bold."
|
||||
":kbd:`Ctrl-C`", "Copy selected text to clipboard."
|
||||
":kbd:`Ctrl-D`", "Wrap selected text, or word under cursor, in double quotes."
|
||||
":kbd:`Ctrl-E`", "If in tree view, edit a document or folder settings."
|
||||
":kbd:`Ctrl-E`", "If in tree view, edit a document or folder settings. (Same as :kbd:`F2`)"
|
||||
":kbd:`Ctrl-F`", "Open the search bar and search for selected word, if any is selected."
|
||||
":kbd:`Ctrl-H`", "Open the search and replace bar and search for selected word, if any is selected."
|
||||
":kbd:`Ctrl-G`", "Find next occurrence of word in current document. (Same as :kbd:`F3`)"
|
||||
":kbd:`Ctrl-H`", "Open the search and replace bar and search for selected word, if any is selected. (On Mac, this is :kbd:`Cmd+=`)"
|
||||
":kbd:`Ctrl-I`", "Format selected text, or word under cursor, as italic."
|
||||
":kbd:`Ctrl-N`", "Create new document."
|
||||
":kbd:`Ctrl-O`", "Open selected document."
|
||||
@@ -91,6 +92,7 @@ These are as following:
|
||||
":kbd:`Ctrl-Shift-1`", "Replace occurrence of word in current document, and search for next occurrence."
|
||||
":kbd:`Ctrl-Shift-A`", "Select all text in current paragraph."
|
||||
":kbd:`Ctrl-Shift-D`", "Wrap selected text, or word under cursor, in single quotes."
|
||||
":kbd:`Ctrl-Shift+G`", "Find previous occurrence of word in current document. (Same as :kbd:`Shift-F3`"
|
||||
":kbd:`Ctrl-Shift-I`", "Import text to the current document from a text file."
|
||||
":kbd:`Ctrl-Shift-N`", "Create new folder."
|
||||
":kbd:`Ctrl-Shift-O`", "Open a project."
|
||||
@@ -100,12 +102,15 @@ These are as following:
|
||||
":kbd:`Ctrl-Shift-Up`", "Move item one step up in the tree view."
|
||||
":kbd:`Ctrl-Shift-Down`", "Move item one step down in the tree view."
|
||||
":kbd:`F1`", "Open documentation."
|
||||
":kbd:`F2`", "Alternative to :kbd:`Ctrl-E`."
|
||||
":kbd:`F3`", "Find next occurrence of word in current document."
|
||||
":kbd:`F2`", "If in tree view, edit a document or folder settings. (Same as :kbd:`Ctrl-E`)"
|
||||
":kbd:`F3`", "Find next occurrence of word in current document. (Same as :kbd:`Ctrl-G`)"
|
||||
":kbd:`F5`", "Export project dialog."
|
||||
":kbd:`F7`", "Re-run spell checker."
|
||||
":kbd:`F9`", "Re-build project indices."
|
||||
":kbd:`Shift-Enter`", "Insert a hard line break at the cursor position."
|
||||
":kbd:`Shift-F3`", "Find previous occurrence of word in current document."
|
||||
":kbd:`Shift-F3`", "Find previous occurrence of word in current document. (Same as :kbd:`Ctrl-Shift-G`"
|
||||
":kbd:`Shift-Space`", "Insert a non-breaking space at the cursor position."
|
||||
":kbd:`Enter`", "If in tree view, open a document for editing."
|
||||
|
||||
.. note::
|
||||
On macOS, replace :kbd:`Ctrl` with :kbd:`Cmd`.
|
||||
|
||||
+12
-3
@@ -475,21 +475,30 @@ class GuiMainMenu(QMenuBar):
|
||||
# Edit > Replace
|
||||
menuItem = QAction("Replace", self)
|
||||
menuItem.setStatusTip("Replace text in document")
|
||||
menuItem.setShortcut("Ctrl+H")
|
||||
if self.mainConf.osDarwin:
|
||||
menuItem.setShortcut("Ctrl+=")
|
||||
else:
|
||||
menuItem.setShortcut("Ctrl+H")
|
||||
menuItem.triggered.connect(lambda: self._docAction(nwDocAction.REPLACE))
|
||||
self.editMenu.addAction(menuItem)
|
||||
|
||||
# Edit > Find Next
|
||||
menuItem = QAction("Find Next", self)
|
||||
menuItem.setStatusTip("Find next occurrence text in document")
|
||||
menuItem.setShortcut("F3")
|
||||
if self.mainConf.osDarwin:
|
||||
menuItem.setShortcuts(["Ctrl+G","F3"])
|
||||
else:
|
||||
menuItem.setShortcuts(["F3","Ctrl+G"])
|
||||
menuItem.triggered.connect(lambda: self._docAction(nwDocAction.GO_NEXT))
|
||||
self.editMenu.addAction(menuItem)
|
||||
|
||||
# Edit > Find Prev
|
||||
menuItem = QAction("Find Previous", self)
|
||||
menuItem.setStatusTip("Find previous occurrence text in document")
|
||||
menuItem.setShortcut("Shift+F3")
|
||||
if self.mainConf.osDarwin:
|
||||
menuItem.setShortcuts(["Ctrl+Shift+G","Shift+F3"])
|
||||
else:
|
||||
menuItem.setShortcuts(["Shift+F3","Ctrl+Shift+G"])
|
||||
menuItem.triggered.connect(lambda: self._docAction(nwDocAction.GO_PREV))
|
||||
self.editMenu.addAction(menuItem)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user