Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions Documentation/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Back to [Home](https://github.com/dankrusi/WindowsVirtualDesktopHelper)
| feature.showDesktopSwitchOverlay.showOnAllMonitors | ``true`` | |
| feature.showDesktopSwitchOverlay.position | ``"middlecenter"`` | |
| feature.useHotKeyToJumpToDesktopNumber | ``false`` | |
| feature.useHotKeyToJumpToDesktopNumber.useDigits | ``true`` | If enabled, the Jump To Desktop feature registers the Keyboard digits |
| feature.useHotKeyToJumpToDesktopNumber.useNumpadDigits | ``true`` | If enabled, the Jump To Desktop feature registers the Numpad digits |
| feature.useHotKeyToJumpToDesktopNumber.useFunctionKeys | ``false`` | If enabled, the Jump To Desktop feature registers the corresponding Function keys |
| feature.useHotKeyToJumpToDesktopNumber.hotkey | ``"Alt"`` | |
| feature.showDesktopNumberInIconTray | ``true`` | |
| feature.showDesktopNumberInIconTray.clickToOpenTaskView | ``true`` | |
Expand Down
13 changes: 7 additions & 6 deletions Source/App/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ private void _MonitorFGWindowName() {
}
}


public void MonitorFocusedWindow() {
var thread = new Thread(new ThreadStart(_monitorFocusedWindow));
thread.Start();
Expand Down Expand Up @@ -428,10 +427,14 @@ public void SetupHotKeys() {
// Compile from features
if(Settings.GetBool("feature.useHotKeyToJumpToDesktopNumber")) {
var hotKey = Settings.GetString("feature.useHotKeyToJumpToDesktopNumber.hotkey");
if(hotKey != null && hotKey != "") {
var jumpUsingDigits = Settings.GetBool("feature.useHotKeyToJumpToDesktopNumber.useDigits");
var jumpUsingNumpadDigits = Settings.GetBool("feature.useHotKeyToJumpToDesktopNumber.useNumpadDigits");
var jumpUsingFunctionKeys = Settings.GetBool("feature.useHotKeyToJumpToDesktopNumber.useFunctionKeys");
if (hotKey != null && hotKey != "") {
for(var i = 1; i <= 9; i++) {
hotkeys.Add($"{hotKey} + D{i} = Desktop{i}");
hotkeys.Add($"{hotKey} + NumPad{i} = Desktop{i}");
if (jumpUsingDigits) hotkeys.Add($"{hotKey} + D{i} = Desktop{i}");
if (jumpUsingNumpadDigits) hotkeys.Add($"{hotKey} + NumPad{i} = Desktop{i}");
if (jumpUsingFunctionKeys) hotkeys.Add($"{hotKey} + F{i} = Desktop{i}");
}
}
}
Expand Down Expand Up @@ -548,7 +551,6 @@ public void SetupHotKeys() {
this._keyboardHooks.RegisterHotKey(hotkeyAction.Modifiers, hotkeyAction.Keys);
}


}

private void _hotKeyPressed(object sender, KeyPressedEventArgs e) {
Expand Down Expand Up @@ -649,7 +651,6 @@ public void UIUpdateIcons() {
this.AppForm.notifyIconNumber.Visible = Settings.GetBool("feature.showDesktopNumberInIconTray");
}


public void UIUpdateIconForVDDisplayNumber(string theme, uint number, string name) {
number++;
this.AppForm.notifyIconNumber.Icon = Util.Icons.GenerateNotificationIcon(number.ToString(), theme, this.AppForm.DeviceDpi, false, FontStyle.Bold);
Expand Down
3 changes: 3 additions & 0 deletions Source/App/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public static void LoadDefaults() {
// Feature: useHotKeyToJumpToDesktopNumber
RegisterDefault("feature.useHotKeyToJumpToDesktopNumber", false);
RegisterDefault("feature.useHotKeyToJumpToDesktopNumber.hotkey", "Alt");
RegisterDefault("feature.useHotKeyToJumpToDesktopNumber.useDigits", true, "If enabled, the Jump To Desktop feature registers the Keyboard digits");
RegisterDefault("feature.useHotKeyToJumpToDesktopNumber.useNumpadDigits", true, "If enabled, the Jump To Desktop feature registers the Numpad digits");
RegisterDefault("feature.useHotKeyToJumpToDesktopNumber.useFunctionKeys", false, "If enabled, the Jump To Desktop feature registers the corresponding Function keys");

// Feature: useHotKeyToJumpToPreviousDesktop
RegisterDefault("feature.useHotKeyToJumpToPreviousDesktop", false);
Expand Down
Loading