Setup for linux
parent
3744929be0
commit
c1e1955a4b
|
@ -5,6 +5,7 @@ using StardewValley;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using stardew_access.Patches;
|
using stardew_access.Patches;
|
||||||
using AutoHotkey.Interop;
|
using AutoHotkey.Interop;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace stardew_access
|
namespace stardew_access
|
||||||
{
|
{
|
||||||
|
@ -38,18 +39,8 @@ namespace stardew_access
|
||||||
Game1.options.setGamepadMode("force_on");
|
Game1.options.setGamepadMode("force_on");
|
||||||
|
|
||||||
// Initialize AutoHotKey
|
// Initialize AutoHotKey
|
||||||
try
|
if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
InitializeAutoHotKey();
|
||||||
ahk = AutoHotkeyEngine.Instance;
|
|
||||||
ahk.ExecRaw("[::\nSend {LButton}");
|
|
||||||
ahk.ExecRaw("^Enter::\nSend {LButton}");
|
|
||||||
ahk.ExecRaw("]::\nSend {RButton}");
|
|
||||||
ahk.ExecRaw("+Enter::\nSend {RButton}");
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
monitor.Log($"Unable to initialize AutoHotKey:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
screenReader = new ScreenReader();
|
screenReader = new ScreenReader();
|
||||||
screenReader.InitializeScreenReader();
|
screenReader.InitializeScreenReader();
|
||||||
|
@ -148,5 +139,21 @@ namespace stardew_access
|
||||||
monitor.Log($"{Game1.player.controller.pathToEndPoint==null}", LogLevel.Debug); // true if path not found
|
monitor.Log($"{Game1.player.controller.pathToEndPoint==null}", LogLevel.Debug); // true if path not found
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitializeAutoHotKey()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ahk = AutoHotkeyEngine.Instance;
|
||||||
|
ahk.ExecRaw("[::\nSend {LButton}");
|
||||||
|
ahk.ExecRaw("^Enter::\nSend {LButton}");
|
||||||
|
ahk.ExecRaw("]::\nSend {RButton}");
|
||||||
|
ahk.ExecRaw("+Enter::\nSend {RButton}");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
monitor.Log($"Unable to initialize AutoHotKey:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using AccessibleOutput;
|
using AccessibleOutput;
|
||||||
using StardewModdingAPI;
|
using StardewModdingAPI;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace stardew_access
|
namespace stardew_access
|
||||||
{
|
{
|
||||||
|
@ -11,6 +12,9 @@ namespace stardew_access
|
||||||
/// <summary>Initializes the screen reader.</summary>
|
/// <summary>Initializes the screen reader.</summary>
|
||||||
public void InitializeScreenReader()
|
public void InitializeScreenReader()
|
||||||
{
|
{
|
||||||
|
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
return;
|
||||||
|
|
||||||
NvdaOutput? nvdaOutput = null;
|
NvdaOutput? nvdaOutput = null;
|
||||||
JawsOutput? jawsOutput = null;
|
JawsOutput? jawsOutput = null;
|
||||||
SapiOutput? sapiOutput = null;
|
SapiOutput? sapiOutput = null;
|
||||||
|
|
Loading…
Reference in New Issue