Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2ef318b
Expand shortcuts, window commands, and mouse gestures
leafOfTree Nov 26, 2026
d0d4552
Keep custom command edits and recorded keys reliable
leafOfTree Dec 5, 2026
ce5dcec
Merge remote-tracking branch 'origin/main' into shortcuts-and-gestures
leafOfTree Dec 5, 2026
97fa28f
Keep window commands responsive and gesture input predictable
leafOfTree Dec 5, 2026
60e64fe
Smooth the mouse gesture trail as it is drawn
leafOfTree Dec 5, 2026
a7366b7
Draw gesture trails as a smooth solid line
leafOfTree Dec 5, 2026
72f1ce5
Recognize custom single-stroke mouse gestures
leafOfTree Dec 5, 2026
2f10a99
Keep the gesture trail connected to the pointer
leafOfTree Dec 5, 2026
4f229cc
Let users adjust freehand gesture similarity
leafOfTree Dec 5, 2026
be1fa8a
Find gesture commands by their translated names
leafOfTree Dec 5, 2026
76db927
Choose direction or freehand gestures with radio buttons
leafOfTree Dec 5, 2026
2efff9d
Capture Alt+Tab when recording keys to send
leafOfTree Dec 5, 2026
b15aa22
Keep the menu mask out of recorded shortcuts
leafOfTree Dec 5, 2026
12c3210
Show each gesture shortcut only once in the list
leafOfTree Dec 5, 2026
57df0e7
Use the settings accent for the selected gesture mode
leafOfTree Dec 5, 2026
53a2130
Show the selected gesture mode as a solid accent dot
leafOfTree Dec 5, 2026
9535a05
Show freehand sample controls when they are useful
leafOfTree Dec 5, 2026
5936664
Clarify the number of recorded gesture samples
leafOfTree Dec 5, 2026
619999d
Compare saved gesture samples and trial drawings side by side
leafOfTree Dec 5, 2026
1f4b167
Show saved gesture samples in a thumbnail grid
leafOfTree Dec 5, 2026
8d48535
Distinguish recorded gestures from the practice canvas
leafOfTree Dec 5, 2026
2ce9e7e
Manage gesture samples in a compact thumbnail row
leafOfTree Dec 5, 2026
9894e3e
Keep gesture recording and practice opt-in
leafOfTree Dec 5, 2026
9d623db
Show saved samples while testing a gesture
leafOfTree Dec 5, 2026
be09b35
Keep practice strokes in place after mouse release
leafOfTree Dec 5, 2026
df9eeb5
Explain hidden launches and give program arguments their own row
leafOfTree Dec 5, 2026
56439c5
Configure screen edges and hot corners from Add gesture
leafOfTree Dec 5, 2026
2c24d44
Align program fields and show launch help on the info icon
leafOfTree Dec 5, 2026
1b6a532
Add a screen gesture shortcut in the Everywhere view
leafOfTree Dec 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,24 @@ right-drag asks, and **Ctrl + Z** in Explorer undoes it.
and **Restore workspace** have no shortcuts by default; assign them with
**Alt + Enter** in the command palette.
- **Mouse gestures:** turn them on under **Settings → Gestures**, then hold the right
button and drag, such as up then right for the next tab. A gesture runs a WindowTabs command
or sends a shortcut to the window, and an app can have its own: browsers and File Explorer
start with back, forward and the like. A right click without dragging still opens the app's
menu.
button and drag, such as up then right for the next tab. A gesture runs a WindowTabs command,
sends a shortcut (including `Win` combinations and media keys), or runs a custom program or
command; an app can have its own, and browsers and File Explorer start with back, forward and
the like. For your own shape, choose **Add gesture → Freehand gesture** and draw it in one
stroke. Draw again to test it, or add the new drawing as another sample for the same action.
Use the same starting point on the shape and draw in the same direction each time.
Under **Settings → Gestures**, lower **Minimum freehand gesture similarity (%)** from its
default of 87 to accept more variation.
While drawing, a live trail and pointer hint show your stroke. A right click without
dragging still opens the app's menu. Under **Add gesture → Screen gestures**, pick an outer
edge and scroll direction or a hot corner, then choose its action. These bindings appear
under **Everywhere**. Enable **Screen edge scroll** or **Screen corners** on the Gestures
page to activate them. The corner delay is set on the same page.
- **Custom programs and commands:** under **Settings → Shortcuts**, add apps, scripts or URIs
to launch directly from a global shortcut, the command palette or a gesture — useful for
common apps as well as linking external tools such as Windows Snipping Tool (`Win + Shift + S`
or `ms-screenclip:`), PowerToys Text Extractor (`Win + Shift + T`), or offline OCR tools like
Umi-OCR (`Umi-OCR.exe --screenshot`).
- **Taskbar:** optionally combine each group into one taskbar button, which shows every
app in the group.
- **Languages:** 20 interface languages. Follow Windows or choose a language in Settings.
Expand Down
1 change: 1 addition & 0 deletions Win32/CommCtrl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public sealed class HotKeyConstants
public const int HOTKEYF_CONTROL = 0x02;
public const int HOTKEYF_ALT = 0x04;
public const int HOTKEYF_EXT = 0x08;
public const int HOTKEYF_WIN = 0x10;
public const int MOD_ALT = 0x0001;
public const int MOD_CONTROL = 0x0002;
public const int MOD_SHIFT = 0x0004;
Expand Down
10 changes: 10 additions & 0 deletions Win32/HotKeyShortcut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public bool IsShiftModifier
get { return isShiftModifier; }
set { isShiftModifier = value; }
}
public bool IsWinModifier
{
get { return isWinModifier; }
set { isWinModifier = value; }
}
public char VirtualKey
{
get { return virtualKey; }
Expand All @@ -36,6 +41,7 @@ public short HotKeyControlCode
mod |= IsAltModifier ? HotKeyConstants.HOTKEYF_ALT : 0;
mod |= IsShiftModifier ? HotKeyConstants.HOTKEYF_SHIFT : 0;
mod |= isExtendedVk ? HotKeyConstants.HOTKEYF_EXT : 0;
mod |= IsWinModifier ? HotKeyConstants.HOTKEYF_WIN : 0;
return WinDefApi.MAKEWORD((int)VirtualKey, mod);
}
set
Expand All @@ -45,6 +51,7 @@ public short HotKeyControlCode
IsAltModifier = (mod & HotKeyConstants.HOTKEYF_ALT) != 0;
IsShiftModifier = (mod & HotKeyConstants.HOTKEYF_SHIFT) != 0;
isExtendedVk = (mod & HotKeyConstants.HOTKEYF_EXT) != 0;
IsWinModifier = (mod & HotKeyConstants.HOTKEYF_WIN) != 0;
VirtualKey = (char)WinDefApi.LOBYTE(value);
}
}
Expand All @@ -56,13 +63,15 @@ public int RegisterHotKeyModifierFlags
mod |= IsCtrlModifier ? HotKeyConstants.MOD_CONTROL : 0;
mod |= IsAltModifier ? HotKeyConstants.MOD_ALT : 0;
mod |= IsShiftModifier ? HotKeyConstants.MOD_SHIFT : 0;
mod |= IsWinModifier ? HotKeyConstants.MOD_WIN : 0;
return mod;
}
set
{
IsCtrlModifier = (value & HotKeyConstants.MOD_CONTROL) != 0;
IsAltModifier = (value & HotKeyConstants.MOD_ALT) != 0;
IsShiftModifier = (value & HotKeyConstants.MOD_SHIFT) != 0;
IsWinModifier = (value & HotKeyConstants.MOD_WIN) != 0;
}
}
public int RegisterHotKeyVirtualKeyCode
Expand All @@ -79,6 +88,7 @@ public int RegisterHotKeyVirtualKeyCode
bool isCtrlModifier;
bool isAltModifier;
bool isShiftModifier;
bool isWinModifier;
bool isExtendedVk;
char virtualKey;
}
Expand Down
46 changes: 42 additions & 4 deletions WtProgram/CommandPalette.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ module CommandPalette =
/// The hidden command that opens a setting's row, which its shortcut is kept for.
let private (|SettingCommand|_|) (item:SettingDefinition) = Commands.find (SettingRows.commandId item)
let private settingKey item = match item with SettingCommand command -> shortcutText command | _ -> ""
/// One row of the actions page: a command, or a setting the commands do not already stand for.
/// One row of the actions page: a command, a user-defined program/command, or a setting the
/// commands do not already stand for.
type private Action =
| ACommand of Command
| ACustom of CustomCommand
/// A setting that is on or off, with its key and the command that turns it.
| ASwitch of SettingDefinition * string * Command
/// A setting with a few values, with its key and values: chosen in place from a list.
Expand All @@ -43,6 +45,10 @@ module CommandPalette =
/// as a switch, turned in place; the settings catalog's shortcut entries are commands already.
let private actions() =
let commands = Commands.all |> List.filter(fun command -> command.listed) |> List.map ACommand
let customs =
match Services.tryGet<IProgram>() with
| Some program -> program.customCommands() |> List.map ACustom
| None -> []
let pages = [GeneralSettings;AppearanceSettings;HotKeySettings;MouseGestureSettings;ProgramSettings;LayoutSettings;DiagnosticsSettings]
let settings =
pages |> List.collect(fun page ->
Expand All @@ -57,11 +63,12 @@ module CommandPalette =
| Toggle(key,_,_) -> Commands.find ("toggle-"+item.id) |> Option.map(fun command -> ASwitch(item,key,command))
| Choice(key,values,_) -> Some(AChoice(item,key,values))
| _ -> Some(ASetting item)))
commands @ settings
commands @ customs @ settings
/// How an action is remembered among the recent ones: a command's id, or a setting's.
let private recentKey action =
match action with
| ACommand command -> command.id
| ACustom command -> "custom:"+command.id
| ASwitch(_,_,command) -> command.id
| AChoice(item,_,_) | ASetting item | ANumberKeys item -> "setting:"+item.id
let private recentLimit = 8
Expand All @@ -83,14 +90,25 @@ module CommandPalette =
let group action =
match action with
| ACommand command -> List.findIndex ((=) command.category) Commands.categories
| ACustom _ -> List.findIndex ((=) AppCommands) Commands.categories
| ASwitch(item,_,_) | AChoice(item,_,_) | ASetting item | ANumberKeys item -> Commands.categories.Length+(match item.page with GeneralSettings -> 0 | AppearanceSettings -> 1 | HotKeySettings -> 2 | MouseGestureSettings -> 3 | ProgramSettings -> 4 | LayoutSettings -> 5 | DiagnosticsSettings -> 6)
let text action = match action with ACommand command -> Commands.textFor command active | ASwitch(item,_,_) | AChoice(item,_,_) | ASetting item | ANumberKeys item -> item.text
let customText (command:CustomCommand) =
let title = CustomCommands.displayName command.name command.target
let same (value:string) = Localization.literal value
{ caption=same title; description=same command.target; keywords=same (command.target+" "+command.args) }
let text action =
match action with
| ACommand command -> Commands.textFor command active
| ACustom command -> customText command
| ASwitch(item,_,_) | AChoice(item,_,_) | ASetting item | ANumberKeys item -> item.text
// The value it shows at the right is found as its name is: a style, a size, a colour's code.
let shownValue action =
try
match action with
| AChoice(item,key,values) -> choiceNow item key values
| ANumberKeys _ -> numberKeyLabel()
// What a choosing command is set to, as a group's side or a corner's action.
| ACommand command -> command.current active
| ASetting item ->
match item.binding with
| _ when item.id=presetId -> presetNow()
Expand All @@ -104,10 +122,14 @@ module CommandPalette =
let keyText action =
match action with
| ACommand command | ASwitch(_,_,command) -> shortcutText command
| ACustom command -> SettingsShortcut.text command.code
| ASetting { binding=Shortcut(key,_) } -> SettingsShortcut.text (listKey key)
| AChoice(item,_,_) | ASetting item | ANumberKeys item -> settingKey item
let extra action =
(match action with ACommand command -> [command.id] | ASwitch(item,_,_) | AChoice(item,_,_) | ASetting item | ANumberKeys item -> [SettingsCatalog.storageKey item])
(match action with
| ACommand command -> [command.id]
| ACustom command -> [command.target;command.args]
| ASwitch(item,_,_) | AChoice(item,_,_) | ASetting item | ANumberKeys item -> [SettingsCatalog.storageKey item])
@ [shownValue action]
{ scope=ActionScope; caption=tr Strings.TabSearch.actions; prompt=tr Strings.TabSearch.actionPrompt
noMatches=tr Strings.TabSearch.noActions; noEntries=tr Strings.TabSearch.noActions; glyph=NoGlyph; icons=(fun _ -> [])
Expand Down Expand Up @@ -143,6 +165,9 @@ module CommandPalette =
// A command with a state is a switch: turned here, the palette staying up to show it.
| ACommand command when (command.state active).IsSome -> command.run active |> ignore; Stay
| ACommand command -> command.run active
| ACustom command ->
Commands.runProgram command.name command.target command.args command.hidden
Done
| ANumberKeys item -> fresh (SettingRows.run item)
| ASwitch(_,_,command) -> command.run active |> ignore; asides.Remove chosen.hwnd |> ignore; Stay
| AChoice(item,_,_) -> fresh (SettingRows.run item)
Expand Down Expand Up @@ -172,6 +197,15 @@ module CommandPalette =
let taken = given.set code
if taken then asides.Clear()
taken })
| ACustom command ->
let latest() = Services.program.customCommands() |> List.tryFind(fun c -> c.id=command.id) |> Option.defaultValue command
Some { current=(latest()).code
usedBy=Commands.anyHolderOf (CustomCommands.key command)
set=fun code ->
let taken = Services.program.saveCustomCommand { latest() with code=code }
if taken then asides.Clear()
taken
inList=false }
// A key of the lists: kept in the settings, never for the whole desktop.
| ASetting { binding=Shortcut(key,_) } ->
Some { current=listKey key
Expand All @@ -195,6 +229,9 @@ module CommandPalette =
let aside =
match action chosen with
| ACommand command -> { detail=""; switch=None; swatch=None; shortcut=shortcutText command; dropdown=false; small=false }
| ACustom command ->
let current = Services.program.customCommands() |> List.tryFind(fun c -> c.id=command.id) |> Option.defaultValue command
{ detail=tr Strings.MouseGestures.runKind; switch=None; swatch=None; shortcut=SettingsShortcut.text current.code; dropdown=false; small=true }
| ASwitch(_,key,command) -> { detail=""; switch=Some(Services.settings.getValue key :?> bool); swatch=None; shortcut=shortcutText command; dropdown=false; small=false }
| AChoice(item,key,values) -> { detail=choiceNow item key values; switch=None; swatch=None; shortcut=settingKey item; dropdown=true; small=false }
| ANumberKeys item -> { detail=numberKeyLabel(); switch=None; swatch=None; shortcut=settingKey item; dropdown=true; small=false }
Expand Down Expand Up @@ -222,6 +259,7 @@ module CommandPalette =
concealed=fun chosen ->
match action chosen with
| ACommand command -> not command.chooses && (command.state active).IsNone
| ACustom _ -> true
| ASetting item ->
match item.binding with
| _ when item.id=presetId -> false
Expand Down
Loading