mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Add modifier key support when user action items.
This commit is contained in:
@@ -135,7 +135,7 @@ namespace Wox.Plugin.Doc
|
||||
Title = name,
|
||||
SubTitle = doc.Name.Replace(".docset", ""),
|
||||
IcoPath = doc.IconPath,
|
||||
Action = () =>
|
||||
Action = (c) =>
|
||||
{
|
||||
string url = string.Format(@"{0}\{1}\Contents\Resources\Documents\{2}#{3}", docsetBasePath,
|
||||
doc.Name, docPath, name);
|
||||
|
||||
@@ -25,7 +25,9 @@ def query(key):
|
||||
results.append(res)
|
||||
return json.dumps(results)
|
||||
|
||||
def openUrl(url):
|
||||
def openUrl(context,url):
|
||||
#shift + enter
|
||||
#if context["SpecialKeyState"]["ShiftPressed"] == "True":
|
||||
webbrowser.open(url)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Wox.Plugin.Everything
|
||||
Result r = new Result();
|
||||
r.Title = Path.GetFileName(s);
|
||||
r.SubTitle = s;
|
||||
r.Action = () =>
|
||||
r.Action = (c) =>
|
||||
{
|
||||
context.HideApp();
|
||||
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Wox.Plugin.Fanyi
|
||||
Title = dst,
|
||||
SubTitle = "Copy to clipboard",
|
||||
IcoPath = "Images\\translate.png",
|
||||
Action = () =>
|
||||
Action = (c) =>
|
||||
{
|
||||
Clipboard.SetText(dst);
|
||||
context.ShowMsg("translation has been copyed to your clipboard.", "",
|
||||
|
||||
Reference in New Issue
Block a user