Skip to content

Commit 778c70d

Browse files
committed
Added: Helper tooltip
1 parent 4541dac commit 778c70d

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ There are 2 types of quick clip tables:
8181
### Hotkeys
8282

8383
- **Win + Shift + L**: Turns on/off the logging of the clipboard and the other hotkeys of this script (a tooltip shows wether the functionallities are turned on or off). When turning it back on, anything on the clipboard is deleted, and if there was a selected clip in the history before turning the script off, the clipboard resets to that clip (the previous position in the history is also being retained)
84+
- **Win + H**: Shows a helping tooltip about all of the availbale hotkeys
8485

8586
# Settings
8687

components/hotkeys.ahk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@
4747

4848
#if
4949

50+
;------------------------------------------------
51+
52+
#if (clipMode == clipModeNone) or (clipMode == clipModeHelp)
53+
54+
#H::
55+
clipMode := clipModeHelp
56+
57+
CoordMode, ToolTip, Screen
58+
ToolTip, %hotkeyHelpText%, 0, 0
59+
CoordMode, ToolTip, Relative
60+
return
61+
62+
#if
63+
5064
;--------------------------------------------------------------------------------------------------
5165
;--------------------------------------------------------------------------------------------------
5266

components/setup.ahk

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ SetupClipLog:
1212

1313
gosub SetupClipLogGlobalVariables
1414

15+
gosub PrepareHelpText
16+
1517
gosub ReadConfigFile
1618

1719
gosub SetupClipLogDirectories
@@ -59,6 +61,7 @@ SetupClipLogFinalValues:
5961

6062
; Clip modes
6163
clipModeNone := "none"
64+
clipModeHelp := "help"
6265
clipModeSetting := "setting"
6366
clipModePreview := "preview"
6467
clipModePaste := "paste"
@@ -94,6 +97,62 @@ SetupClipLogFinalValues:
9497
notifySavedQSlot := "Clip saved to quick slot"
9598
notifySavedHSlot := "Clip saved to the history"
9699

100+
; Help text
101+
; Helping regex replace: "- \*\*(.*)\*\*: ?(.*[^ ])" => "hotkeyHelpData["history"].Push(["$1", "$2"])"
102+
hotkeyHelpData := {}
103+
104+
hotkeyHelpData["0_General"] := []
105+
hotkeyHelpData["1_StandardClip"] := []
106+
hotkeyHelpData["2_QuickClip"] := []
107+
108+
hotkeyHelpData["0_General"].Push(["Win + Shift + L", "Turns on/off the logging of the clipboard and the other hotkeys of this script"])
109+
hotkeyHelpData["0_General"].Push(["Win + H", "Shows a helping tooltip about all of the availbale hotkeys"])
110+
111+
hotkeyHelpData["1_StandardClip"].Push(["Win + (LeftArrow / LeftClick / MouseForward / ScrollDown)", "Go one position back in the history"])
112+
hotkeyHelpData["1_StandardClip"].Push(["Win + (RightArrow / RightClick / MouseBackward / ScrollUp)", "Go one position forward in the history"])
113+
hotkeyHelpData["1_StandardClip"].Push(["Win + (UpArrow / DownArrow / MiddleMouseButton)", "Only show the preview of the current clip"])
114+
hotkeyHelpData["1_StandardClip"].Push(["Win + <Any number>", "Go to the clip with the number pressed"])
115+
hotkeyHelpData["1_StandardClip"].Push("")
116+
hotkeyHelpData["1_StandardClip"].Push(["Win + Alt + <Any number>", "Instantly paste the clip from the history without changing the content on the clipboard"])
117+
hotkeyHelpData["1_StandardClip"].Push("")
118+
hotkeyHelpData["1_StandardClip"].Push(["Win + Shift + Enter", "A small window pops up, where you can enter some text you wish to save to the history"])
119+
hotkeyHelpData["1_StandardClip"].Push(["Win + Shift + <Any number>", "Add the quickClip indexed with the pressed number (if it exists) to the history and put it on the clipboard"])
120+
hotkeyHelpData["1_StandardClip"].Push("")
121+
hotkeyHelpData["1_StandardClip"].Push(["Win + Shift + Alt + (LeftArrow / LeftClick / MouseForward)", "Delete the older neighbour of the currently selected clip (if it exists)"])
122+
hotkeyHelpData["1_StandardClip"].Push(["Win + Shift + Alt + (RightArrow / RightClick / MouseBackward)", "Delete the younger neighbour of the currently selected clip (if it exists)"])
123+
hotkeyHelpData["1_StandardClip"].Push(["Win + Shift + Alt + (DownArrow / UpArrow / MiddleMouseButton)", "Delete the currently selected clip (if there is one selected)"])
124+
hotkeyHelpData["1_StandardClip"].Push(["Win + Shift + Alt + <Any number>", "Delete the clip with the same index as the number which is being pressed (if it exists)"])
125+
126+
hotkeyHelpData["2_QuickClip"].Push(["Shift + Alt + <Any number>", "Change to the associated quick clip table"])
127+
hotkeyHelpData["2_QuickClip"].Push(["Shift + Alt + Tab", "Step through the named quick clip tables"])
128+
hotkeyHelpData["2_QuickClip"].Push("")
129+
hotkeyHelpData["2_QuickClip"].Push(["Win + Shift + Ctrl + <Any number>", "Save the current clipboard data to the quick clip at the position of the number you pressed"])
130+
hotkeyHelpData["2_QuickClip"].Push(["Win + Shift + Ctrl + Enter", "A small window pops up, where you can enter some text you wish to save to one of the quickClip slots"])
131+
hotkeyHelpData["2_QuickClip"].Push(["Win + Shift + Ctrl + Alt + <Any number>", "Delete the clipboard data to the the quick clip at the position of the number you pressed"])
132+
hotkeyHelpData["2_QuickClip"].Push(["Win + Ctrl + <Any number>", "Open a preview of the quock clip at the position of the number you pressed"])
133+
hotkeyHelpData["2_QuickClip"].Push(["Win + Ctrl + Alt + <Any number>", "Instant paste the quck clip at the position of the number you pressed"])
134+
return
135+
136+
PrepareHelpText:
137+
138+
hotkeyHelpText := "Hotkey help"
139+
140+
for category, data in hotkeyHelpData {
141+
hotkeyHelpText .= "`n`n"
142+
hotkeyHelpText .= category . ":"
143+
144+
for index, textArr in data {
145+
hotkeyHelpText .= "`n"
146+
147+
if (!IsObject(textArr)) {
148+
continue
149+
}
150+
151+
hotkeyHelpText .= "- "
152+
hotkeyHelpText .= textArr[1] . ": " . textArr[2]
153+
}
154+
}
155+
97156
return
98157

99158
;------------------------------------------------

0 commit comments

Comments
 (0)