Can someone please tell me how to create a new keyboard shortcut for creating a new text file?

I have installed Autohotkey but I don't know how to specify script. I want to use Ctrl + Alt + N as keyboard shortcut for new file creation.

Please tell me script for this shortcut as their tutorial seems to be of not much help.


Using AutoHotkey:

if WinActive("ahk_class Progman") or WinActive("ahk_class WorkerW") ; desktop
    FileAppend,, %A_Desktop%\New Textfile.txt
    Run, %A_Desktop%\New Textfile.txt
if WinActive("ahk_class CabinetWClass") ; explorer
    for window in ComObjCreate("Shell.Application").Windows
    try Fullpath := window.Document.Folder.Self.Path
    FileAppend,, %Fullpath%\New Textfile.txt
    Run, %Fullpath%\New Textfile.txt
  • Thanks, it is not exactly what I wanted but its close. – Rolen Koh Apr 27 '16 at 11:53

Just do this.

Type this into Notepad and save as Notepad.bat.

START "" notepad.exe

enter image description here

Next save Notepad.bat in your documents like below or another Directory.

I saved mine here C:\Users\MBurris\Documents\Notepad

enter image description here

Next Right click and make a shortcut. Drag this shortcut to your desktop. Right click the shortcut and rename it to Notepad. enter image description here

Now add your hotkey to the shortcut. Cntrl+Alt+N

enter image description here


Finally to make this look clean.

You have the option to hide the shortcut.

Open Cmd and type attrib Notepad.lnk +s +h

enter image description here

Thats it now just use Cntrl+Alt+N and Notepad will open up.

enter image description here

Note: to unhide this use

attrib Notepad.lnk -s -h
  • Thanks, it is not exactly what I wanted but its close. – Rolen Koh Apr 27 '16 at 11:53
  • 2
    Well what do you want then? You got two good answers, neither of which you built upon or clarified. What do you mean by "creating a new text file"?... do you want it saved on disk somewhere and opened in an editor? Do you want an empty text file sitting somewhere on your hard drive? – JJohnston2 May 3 '16 at 5:57

Windows Explorer keyboard shortcut (without AutoHotkey)

In Windows Explorer, you can hit Alt+F, W, T to create a new text file in the current folder.


  • Alt+F: Opens the File menu of Windows Explorer
  • W: Opens the New menu
  • T: Selects the Text Document entry

Menu File - New - Text Document


You could simulate those keystrokes with an AutoHotkey script mapped to the Ctrl+Alt+N keyboard shortcut you want:

Send, !f
Send, w
Send, t

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.