root/branches/mbutscher/work/extensions/KeyBindings.py @ 263

Revision 263, 3.5 kB (checked in by mbutscher, 3 years ago)

branches/stable-2.1:
* Support for URL appendix "prnr" to create a relative link which is

not relocated (modified) when exported as HTML to a different
destination (backported to 2.1 to provide some backward compatibility
to old behavior)

* Bug fixed: Favorite wiki icons may open wrong wiki
* Bug fixed: Misleading error message and bad error handling for

corrupted wiki config file

* Internal: Default maximum length of compatible filename reduced from

250 to 120

branches/mbutscher/work:
* Less jumping around of selection in doc structure window when adding

text (thanks to Christian Ziemski)

* Support for spaces in bracketed URLs
* Option to control type of URL (bracketed or not) on drag&drop
* Support for URL appendix "prnr" to create a relative link which is

not relocated (modified) when exported as HTML to a different
destination

* Option to sort list in "Open Wiki Word" dialog in reverse

alphabetical order

* Shortcuts introduced to move one or more selected logical lines one

line up or down

* Bug fixed: Favorite wiki icons may open wrong wiki
* Bug fixed: Misleading error message and bad error handling for

corrupted wiki config file

* Internal: Deprecated makeRelUrlAbsolute() and makeAbsPathRelUrl() in

PersonalWikiFrame?, call functions in WikiDocument? instead

* Internal: Default maximum length of compatible filename reduced from

250 to 120

* File cleanup now in usable state (orphaned files complete, missing

files need work yet)

Line 
1import wx, wx.stc
2
3NewWiki="Ctrl-N"
4OpenWiki="Ctrl-Alt-O"
5OpenWikiNewWindow=""
6SearchWiki="Ctrl-Alt-F"
7ViewBookmarks="Ctrl-Shift-B"
8ShowTreeControl="Ctrl-T"
9ShowToolbar="Ctrl-Shift-T"
10ShowDocStructure=""
11ShowTimeView=""
12StayOnTop=""
13OpenWikiWord="Ctrl-O"
14Save="Ctrl-S"
15Print="Ctrl-P"
16Rename="Ctrl-Alt-R"
17Delete="Ctrl-D"
18AddBookmark="Ctrl-Alt-B"
19CatchClipboardAtPage=""
20CatchClipboardAtCursor=""
21CatchClipboardOff=""
22ActivateLink="Ctrl-L"
23if wx.Platform == "__WXMSW__":
24    ActivateLinkNewTab="Ctrl-Alt-L"
25    ActivateLinkBackground="Ctrl-Shift-L"
26else:
27#elif wx.Platform == "__WXGTK__":
28    # On Linux (at least with KDE) the above Windows' key bindings doesn't work
29    #    "Ctrl-Alt-L"     creates character 0xFF (and is in KDE command interface)
30    #    "Ctrl-Shift-L"   simply does nothing
31    ActivateLinkNewTab="Alt-Shift-L"
32    ActivateLinkBackground="Alt-Shift-Ctrl-L"
33    # to test: What about Mac OSX?   wx.Platform == "__WXMAC__"
34
35ViewParents="Ctrl-Up"
36ViewParentless="Ctrl-Shift-Up"
37ViewChildren="Ctrl-Down"
38ViewHistory="Ctrl-H"
39ClipboardCopyUrlToCurrentWikiword=""
40AddVersion=""
41SetAsRoot="Ctrl-Shift-Q"
42ResetRoot=""
43UpHistory="Ctrl-Alt-Up"
44DownHistory="Ctrl-Alt-Down"
45GoBack="Alt-Left"
46GoForward="Alt-Right"
47GoUpwardFromSubpage=""
48if wx.Platform == "__WXMAC__":
49    GoHome="Ctrl-Shift-H"
50    StartIncrementalSearch="Alt-Shift-F"
51    FocusFastSearchField="Alt-Shift-S"
52else:
53    GoHome="Ctrl-Q"
54    StartIncrementalSearch="Ctrl-F"
55    FocusFastSearchField="Ctrl-Shift-F"
56Bold="Ctrl-B"
57Italic="Ctrl-I"
58Heading="Ctrl-Alt-H"
59SpellCheck=""
60Cut="Ctrl-X"
61Copy="Ctrl-C"
62CopyToScratchPad="Ctrl-Alt-C"
63Paste="Ctrl-V"
64SelectAll="Ctrl-A"
65Undo="Ctrl-Z"
66Redo="Ctrl-Y"
67AddFileUrl=""
68FindAndReplace="Ctrl-R"
69ReplaceTextByWikiword="Ctrl-Shift-R"
70ConvertAbsoluteRelativeFileUrl=""
71RewrapText="Ctrl-W"
72Eval="Ctrl-E"
73InsertDate="Ctrl-Alt-D"
74MakeWikiWord="Ctrl-J"
75
76ShowFolding=""
77ToggleCurrentFolding=""
78UnfoldAll=""
79FoldAll=""
80
81ShowEditor="Ctrl-Shift-A"
82ShowPreview="Ctrl-Shift-S"
83ShowSwitchEditorPreview="Ctrl-Shift-Space"
84#if wx.Platform == "__WXMAC__":
85    # no good keybinding found that works on Mac
86    # ShowSwitchEditorPreview="??????"
87
88ZoomIn=""
89ZoomOut=""
90CloneWindow=""
91
92ContinueSearch="F3"
93BackwardSearch="Shift-F3"
94if wx.Platform == "__WXMAC__":
95    AutoComplete="Alt-Space"
96else:
97    AutoComplete="Ctrl-Space"
98ActivateLink2="Ctrl-Return"
99SwitchFocus="F6"
100CloseCurrentTab="Ctrl-F4"
101GoNextTab="Ctrl-Tab"
102GoPreviousTab="Ctrl-Shift-Tab"
103
104# Move selected logical line(s) one line up or down. "WithIndent" means that
105# all lines below selection which are deeper indented than the last selected one
106# are also selected and moved
107LogLineUp=""
108LogLineUpWithIndented=""
109LogLineDown=""
110LogLineDownWithIndented=""
111
112
113Plugin_AutoNew_Numbered = "Ctrl-Shift-N"
114
115Plugin_GraphVizStructure_ShowRelationGraph = ""
116Plugin_GraphVizStructure_ShowRelationGraphSource = ""
117Plugin_GraphVizStructure_ShowChildGraph = ""
118Plugin_GraphVizStructure_ShowChildGraphSource = ""
119
120
121def makeBold(editor):
122    editor.styleSelection(u'*')
123
124def makeItalic(editor):
125    editor.styleSelection(u'_')
126
127def addHeading(editor):
128    bytePos = editor.PositionAfter(editor.GetCurrentPos())
129    editor.CmdKeyExecute(wx.stc.STC_CMD_HOME)
130    editor.AddText(u'+')
131    editor.GotoPos(bytePos)
132
133def makeWikiWord(editor):
134    text = editor.GetSelectedText()
135    text = text.replace(u"'", u"")
136    text = text[0:1].upper() + text[1:]
137    text = u"[" + text + u"]"
138    editor.ReplaceSelection(text)
Note: See TracBrowser for help on using the browser.