Make ctrl-F16 register windows actually
This commit is contained in:
@@ -81,35 +81,27 @@ namespace EveOPreview.Services
|
|||||||
|
|
||||||
this._hideThumbnailsDelay = this._configuration.HideThumbnailsDelay;
|
this._hideThumbnailsDelay = this._configuration.HideThumbnailsDelay;
|
||||||
|
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup1ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup1ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup1ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup1ClientsOrder);
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup1BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup1ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup1BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup1ClientsOrder);
|
||||||
|
//
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup2ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup2ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup2ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup2ClientsOrder);
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup2BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup2ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup2BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup2ClientsOrder);
|
||||||
|
//
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup3ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup3ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup3ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup3ClientsOrder);
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup3BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup3ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup3BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup3ClientsOrder);
|
||||||
|
//
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup4ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup4ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup4ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup4ClientsOrder);
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup4BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup4ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup4BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup4ClientsOrder);
|
||||||
|
//
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup5ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup5ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup5ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup5ClientsOrder);
|
||||||
RegisterCycleClientHotkey(this._configuration.CycleGroup5BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup5ClientsOrder);
|
// RegisterCycleClientHotkey(this._configuration.CycleGroup5BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup5ClientsOrder);
|
||||||
|
//
|
||||||
// Setup toggle tracking hotkey (Ctrl+T)
|
// Setup toggle tracking hotkey (Ctrl+T)
|
||||||
var mainHandle = this._processMonitor.GetMainProcess().Handle;
|
var mainHandle = this._processMonitor.GetMainProcess().Handle;
|
||||||
System.Diagnostics.Debug.WriteLine($"Registering hotkey with main window handle: {mainHandle}");
|
System.Diagnostics.Debug.WriteLine($"Registering hotkey with main window handle: {mainHandle}");
|
||||||
this._toggleTrackingHotkey = new HotkeyHandler(mainHandle, Keys.Control | Keys.T);
|
this._toggleTrackingHotkey = new HotkeyHandler(mainHandle, Keys.Control | Keys.F16);
|
||||||
this._toggleTrackingHotkey.Pressed += (object s, HandledEventArgs e) =>
|
this._toggleTrackingHotkey.Pressed += (object s, HandledEventArgs e) =>
|
||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine("Hotkey handler triggered!");
|
|
||||||
if (!Control.IsKeyLocked(Keys.Scroll))
|
|
||||||
{
|
|
||||||
System.Diagnostics.Debug.WriteLine("Scroll lock is off, passing through");
|
|
||||||
e.Handled = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var foregroundHandle = this._windowManager.GetForegroundWindowHandle();
|
var foregroundHandle = this._windowManager.GetForegroundWindowHandle();
|
||||||
if (foregroundHandle != IntPtr.Zero)
|
if (foregroundHandle != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user