Fix F8 hotkey not respecting Enter option
The Typer._typeEnter property was not being updated, because the LowLevelKeyboardListener was creating it's own instance, without reading settings
This commit is contained in:
@@ -89,11 +89,10 @@ namespace TypeClipboard
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
_listener = new LowLevelKeyboardListener();
|
||||
_tc = new Typer();
|
||||
_listener = new LowLevelKeyboardListener(_tc);
|
||||
// Changing the chkHotkey.Checked property also hooks the listener
|
||||
chkHotkey.Checked = Properties.Settings.Default.enableHotkey;
|
||||
|
||||
_tc = new Typer();
|
||||
|
||||
// Changing the chkEnter.Checked property also changes _tc.TypeEnter property
|
||||
chkEnter.Checked = Properties.Settings.Default.enableEnter;
|
||||
|
||||
@@ -51,11 +51,12 @@ namespace TypeClipboard
|
||||
|
||||
private LowLevelKeyboardProc _proc;
|
||||
private IntPtr _hookID = IntPtr.Zero;
|
||||
private Typer _tc = new Typer();
|
||||
public Typer _tc;
|
||||
|
||||
public LowLevelKeyboardListener()
|
||||
public LowLevelKeyboardListener(Typer tc)
|
||||
{
|
||||
_proc = HookCallback;
|
||||
_tc = tc;
|
||||
}
|
||||
|
||||
public void HookKeyboard()
|
||||
|
||||
Reference in New Issue
Block a user