Good one! Though, I’m personally not a fan of overwriting global hotkeys #n is a new Quick Note in OneNote. And, the w and t keys only works if you don’t have more things in your context menu that have the w as the trigger key. For me, I have WinZip installed and it’s trigger is a w leaving new text file the second w.
Here’s a way around that. This will copy the current path of the current File Explorer and create a new empty text file in that same directory (also notice I used !n as to not overwrite built in hotkeys).
!n::
KeyWait, n
Send, ^l^c
FileAppend,, %clipboard%\new_file.txt
return
Expanding on that, I like to keep a directory of text file notes. This one will take what you have in your clipboard, write it to a text file in your notes directory of choice then, show you the file.
^!n::
FormatTime, t,, yyyy-MM-dd-HH-mm
file = C:\path\to\notes\directory\%t%.txt
FileAppend, %clipboard%, %file%
run, %file%
return
Furthermore, if we want to use OneNote’s built in Quick Note, I made a hotkey that creates the Quick Note and adds the current date as the title triggered.
~#n::
WinWaitActive, Untitled page - OneNote
Send, ^+t
FormatTime, stamp,, yyyy-MM-dd h:mm:ss tt
SendInput, %stamp%{enter}
return
Note: the tilde in this hotkey allows the hotkey’s native function to still execute thus not overwriting it.
Hope someone gets some use out of these!