-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdc_hotkeys.ahk
95 lines (78 loc) · 2.16 KB
/
dc_hotkeys.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
;; This is a simple collection of hotkeys designed for general use.
;; Author: Devin Curry
;; Developed with AHK 1.1.05.01
;;
;; Here is a table of contents:
;; * Paste File as Path: Ctrl + Shift + V
;; * Cycle Slashes Inline: Ctrl + Alt + /
;; * Type Out Clipboard: Win Key + V
;;
;; Then there are a few fun emoticons at the bottom.
;; Just type "/shrug" then 1 more character.
;;
;; Feel free to change or delete any of the hotkeys to your liking.
;;
;; Hotkeys
;; ! = Alt; ^ = Ctrl; + = Shift; # = Win Key
; Paste File as Path
^+v::
; Store the actual file
; FIXME: This part fails in the exe, disabling for now
; Cache := ClipboardAll
; Evaluate clipboard evaluated as string
Path := Clipboard
Clipboard := Path
; Paste and restore actual file in clipboard
Send, ^v
; FIXME: This part fails in the exe, disabling for now
; Clipboard := Cache
return
; Cycle Slashes Inline
!^/::
; Cycles between \\, \, and / in the current line of text.
; Keeps old Clipboard but leaves the whole line selected so you can option to copy it.
Cache := ClipboardAll
Send, {Home}
Send, +{End}
Send, ^c
Path := Clipboard
if InStr(Path, "\\") {
StringReplace, Path, Path, \\, \, All
}
else if InStr(Path, "\") {
StringReplace, Path, Path, \\, /, All
StringReplace, Path, Path, \, /, All
}
else {
StringReplace, Path, Path, /, \\, All
}
Clipboard := Path
Send, ^v
Send, {Home}
Send, +{End}
Clipboard := Cache
return
; Type Out Clipboard
#V::
; Example use cases:
; * Paste without formatting.
; * Paste passwords when the widget only allows typing.
; * Impress your mom with your fast typing.
SendRaw, %Clipboard%
return
; Reload this script - For development purposes
#+R::
Reload
return
;;
;; Type Emoticons - Just for fun
;;
; WARNING: If you're running the .ahk and these don't work. Make sure this file is saved as UTF-8-BOM
::/no::ಠ_ಠ
::/shrug::¯\_(ツ)_/¯
::/flip::(╯°□°)╯︵ ┻━┻
::/flip2::(┛◉Д◉)┛彡┻━┻
::/flip3::(ノಠ益ಠ)ノ彡┻━┻
::/lenny::( ͡° ͜ʖ ͡°)
::/why::щ(゚Д゚щ)
::/yay::ヽ(^∇^)ノ