-
Notifications
You must be signed in to change notification settings - Fork 166
Add Start Button Actions mod #2635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Start Button Actions mod #2635
Conversation
|
@m417z I was wondering how to tackle issue with windows key I've mentioned in the readme. Should I remove that option from the mod, keep it or maybe you'd have an idea how to solve it. It works somehow in Open-Shell-Menu, but couldn't figure out how to solve that problem. |
| HANDLE thread = OpenThread(THREAD_SET_CONTEXT, FALSE, threadId); | ||
| if (thread) { | ||
| // Queue an APC to unregister hotkeys in the correct thread context | ||
| QueueUserAPC(UnregisterHotkeysAPC, thread, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right, the start menu isn't part of explorer.exe, and the mod only targets explorer.exe. How does this work?
| } | ||
|
|
||
| // Decide elevation behavior | ||
| bool wantUnelevated = (g_runCustomActionsAs == "user"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the assumption here that the current process is elevated? explorer.exe is normally not elevated.
| return nullptr; | ||
| } | ||
|
|
||
| std::wstring GetModuleDirectory() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is unused.
| SendVirtualKey(VK_ESCAPE, false); | ||
| } | ||
|
|
||
| void ClickStartButton() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is unused.
Normally, a non-elevated process can't simulate keyboard/mouse events as long as an elevated window is on the foreground. That's a security measure. I don't think there's a workaround for it. |
Start Button Actions
This mod allows you to assign custom actions to various Start button clicks and Windows key press while preserving all default Windows key combinations (Win+R, Win+L, Win+D, etc.).
Features
Settings
Start Button Actions
Each type of click on the Start button can be configured independently:
Windows Key Action
Elevation for Custom Commands
Command Examples
notepad.exe- Opens Notepadcmd.exe- Opens Command Prompt%PROGRAMFILES%\Everything\Everything.exe- Launch Everything searchpowershell.exe -Command "Get-Process"- PowerShell commandHow It Works
The mod installs low-level keyboard and mouse hooks that monitor Start button clicks and Windows key events:
Compatibility
Issues