moudey / Shell

Powerful context menu manager for Windows File Explorer
https://nilesoft.org
MIT License
2.9k stars 96 forks source link

Keyboard shortcut #399

Open DanRotaru opened 5 months ago

DanRotaru commented 5 months ago

Does Nilesoft Shell has keyboard shortcut options?

If has, how I can configure it to my items? image

For example for my item which creates new blank file in explorer, I want to run it by pressing CTRL + N when active window is explorer: item(title='Create blank file' cmd=io.file.create('zfile', null, true) image=\uE10E)

RubicBG commented 5 months ago

image NS doesn't support global keyboard shortcuts - it just displays information about them (or displays whatever you tell it to). You can use another 3rd party app to make the global keyboard combination - with the combination of the two programs you will achieve the desired result

DanRotaru commented 5 months ago

Yeah, I can use AutoHotkey, but, for best performance, better explorer integration and a lot of Nilesoft Shell stuff/functions/proprietes will allow me to do a lot more, easier and faster in one program.

Today20092 commented 3 months ago

Yeah, I can use AutoHotkey, but, for best performance, better explorer integration and a lot of Nilesoft Shell stuff/functions/proprietes will allow me to do a lot more, easier and faster in one program.

@DanRotaru what was your solution? I'm trying to do the same here, but for "copy as path" it used to be ctrl+shift+c but now its missing.

image

RubicBG commented 3 months ago

the original command "copy as path" with the keyboard shortcuts "ctrl+shift+c" is there, in the screenshot you shared: at the bottom of the menu where the cursor is captured

RubicBG commented 3 months ago
modify(find='"Copy as path"' keys='Ctrl+Shift+C')

add this line in shell.nss before import 'imports/modify.nss'

DanRotaru commented 3 months ago

Yeah, I can use AutoHotkey, but, for best performance, better explorer integration and a lot of Nilesoft Shell stuff/functions/proprietes will allow me to do a lot more, easier and faster in one program.

@DanRotaru what was your solution? I'm trying to do the same here, but for "copy as path" it used to be ctrl+shift+c but now its missing.

image

In your case you already have explorer native keyboard shortcut (CTRL + SHIFT + C), If you want to just display this shortcut in Shell context menu, you just add keys parameter, or how @RubicBG mentioned use modify command. Initial I'm talking about a bit different, to execute context menu commands with keyboard. For example like you create a new menu item, "Open this file with my custom program", and create keyboard shortcut for it, e.g. CTRL + / (for now you can only display this shortcut keyboard, but not execute by keypress), always when you press CTRL + /, select a file, and active process is explorer, will be executed this command (open your selected file in specific program). Can be a lot of any others use-cases what can boost a lot your work productivity, using just a single app with owns APIs. How I specified you can use other apps for that, like Autohotkey. There you can specify keyboard shortcut, write a code which will determine if explorer is active window, and if is selected or not file. Autohotkey provides APIs to work with, but I've open this topic just because for better performance, and as feature request for this util Shell app if is possible to create owns APIs to working with, maybe just some basic like I previously said, not same as autohotkey. That's all:)

Today20092 commented 3 months ago

@DanRotaru Ah, thank you for this. I was using CTRL+SHIFT+C on my files but whenever i went to paste it nothing was happening. Now that it's been some days, it works now; maybe my computer decided to stop being lazy 🤣.

Bur seriously, i'm not sure what was making it not work.

Can be a lot of any others use-cases what can boost a lot your work productivity, using just a single app with owns APIs.

I understand now. You'd rather use something from within nilesoft shell in order to increase performance over using autohotkey