Keyboard shortcut to make New Dir: possible?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Bali

Keyboard shortcut to make New Dir: possible?

Post by Bali »

Hello,

Is there a way to make a keyboard shortcut to create a new dir or a new file anywhere in desktop, file manager..., instead of a right mouse click?

Thank you in advane
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
viking777

Re: Keyboard shortcut to make New Dir: possible?

Post by viking777 »

Don't you have a context menu key between 'Alt Gr' and 'Rt Ctrl'? It is on every keyboard I own. (use that followed by the F key). Tested on Xfce - it works.
Bali

Re: Keyboard shortcut to make New Dir: possible?

Post by Bali »

Hi


Yes i have it and i tried: it open a menu like if i do a rigth click. But I am not looking for this; i look for and shortcut that makes directly a new folder in the window where i am
viking777

Re: Keyboard shortcut to make New Dir: possible?

Post by viking777 »

Well you could do it this way, but it would only create a folder on your desktop, not anywhere else. Open Settings>Keyboard>Application Shortcuts and click add, for the command use:

Code: Select all

mkdir /home/yourusername/Desktop/new
(substitute your proper username of course).

Type the keyboard shortcut you want to use. That is it. The command for a file on your desktop would be:

Code: Select all

touch /home/yourusername/Desktop/new
(with a different keyboard shortcut).

File managers usually have a shortcut for creating files and folders. On Thunar the command for a new folder is Ctl/Shift/n, but it doesn't seem to have one for a new file (my file manager does have one - Ctl/Shift/f - but I guess that doesn't help you much).

Basically you can do certain things, but if you expect one shortcut to create new files and folders in all places then I don't think that exists, you will have to right click like the rest of us do.
Bali

<SOLVED>Re: Keyboard shortcut to make New Dir: possible?

Post by Bali »

viking777 wrote:Well you could do it this way, but it would only create a folder on your desktop, not anywhere else. Open Settings>Keyboard>Application Shortcuts and click add, for the command use:

Code: Select all

mkdir /home/yourusername/Desktop/new
(substitute your proper username of course).

Type the keyboard shortcut you want to use. That is it. The command for a file on your desktop would be:

Code: Select all

touch /home/yourusername/Desktop/new
(with a different keyboard shortcut).

File managers usually have a shortcut for creating files and folders. On Thunar the command for a new folder is Ctl/Shift/n, but it doesn't seem to have one for a new file (my file manager does have one - Ctl/Shift/f - but I guess that doesn't help you much).

Basically you can do certain things, but if you expect one shortcut to create new files and folders in all places then I don't think that exists, you will have to right click like the rest of us do.
Hello,

Thank you so much for this trick: both of them works ! Nice!
Locked

Return to “Xfce”