13

OS: Windows (Windows Explorer).

I'm frequently using: RightClick → New → Text Document

It lets you to name the file before opening and saving it. Is there a solution to run a script by a Hotkey and get it? (No matter what the Keyboard Layout is)

Maybe this can help "Create new text document" option missing from context menu

  • Half of the answer might include: pin Notepad to the start menu via right click -- pin to start menu. After that, click on the new Notepad entry on top of the start menu and choose Properties. In the Shortcuttab, hit the mouse cursor into the Shortcut Key box and press your chosen hot key, e.g. ctrl-alt-n. Close the properties windows with "OK". After that, Notepad will be started after you press ctrl-alt-n. However, if you hit File - Save as... in Notepad, it will open your Documents library, so you have to browse to the final destination first. – stueja Jun 20 '16 at 11:17
  • Thank you for your answer, but the question is about, how to name the txt file before you open it for editing - a Hotkey for this. – Stamimail Jun 23 '16 at 8:04
  • You should clearly state what OS (OS family) and file manager you are talking about. I can guess it's Windows and its native explorer.exe and I'm probably right; nevertheless your question should provide that information. A tag will be useful. – Kamil Maciorowski Jul 3 '16 at 17:33
  • Another hint: fsutil file createnew emptyfile.txt 0 – Stamimail Jun 22 '18 at 8:38
11

You can actually use your keyboard to naviagte the right-click menu.

Just right click and press W then T.


If you want to customise a keyboard shortcut, you could use something like AutoHotKey. An example script to do what you want would be like this.

F4::
Macro1:
Click, Right, 1
Sleep, 10
SendRaw, wt
Return

You can use this script by copying it to a text file and saving it as .ahk. With AutoHotKey installed, just double-click to activate.

Quick note:

The first line tells it to run the actions when the F4 is pressed. You can change the key by editing the first line.
The modifier keys are as follows:

# Win (Windows logo key)
! Alt
^ Control
+ Shift
& An ampersand may be used between any two keys or mouse buttons to combine them into a custom hotkey.

Where ^C means Control + C
Anything more advanced can be found in the docs. I suggest checking out the tutorial page.

  • Assuming Windows and Windows Explorer. – ak11234 Jul 4 '16 at 21:56
  • This solution is a kind of workaround. I was looking for a more direct solution, but thanks. – Stamimail Jul 7 '16 at 13:10
  • instead of doing a mouse click, it's better to press the menu key on the keyboard which is called AppsKey in AHK – phuclv Sep 12 '18 at 5:04
  • The menu key should be used. The OP was asking for a "hotkey" not a mouse click. – Kai Noack Jan 7 at 5:55
3

This isn't a hotkey as such but can be accomplished entirely on the keyboard and doesn't require any programs or system changes:

ALT+h, w and then press or as many times as necessary.

0

Another shortcut on Windows10 will be: alt+h, w - than right-click on "New Dokument" and from the dropdown menu choose "Add gallery to QuickAccess Toolbar". Now the whole dropdown menu is accessible on every WindowsExplorer Window at the very, very top left of the window. Now whenever you need to open a WinExplorer window, you can add a Text File (or other stuff) with just 2 klicks. For Win10 (not tested on older Operating Systems) Hope this helps somebody.

  • Alt+H, W was answered by pyrmont days ago – phuclv Sep 23 '18 at 14:02
  • @phuclv I don't think @NikosNachos is repeating the Alt+H, W answer. The details of the answer are to add the function to the Quick Access Toolbar putting the desired functionality within 2 keystrokes (eg Alt, 3) rather than 8 (eg Alt, h, w, dwn, dwn, dwn, dwn, dwn). – Josh Gust Jan 28 at 22:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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