Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Fixed keyboard macros
Browse files Browse the repository at this point in the history
  • Loading branch information
AptiviCEO committed Aug 4, 2022
1 parent 6e00d48 commit a5e3dc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ReadLine.Reboot/KeyBase/KeyHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class KeyHandler
internal int _prePromptCursorTop;
internal readonly List<string> _history;
internal readonly List<string> _currentLineEditHistory;
internal readonly List<(string, bool)> _keyboardMacro = new();
internal readonly List<ConsoleKeyInfo> _keyboardMacro = new();
internal bool _keyboardMacroRecording = false;

// Private Properties
Expand Down Expand Up @@ -1376,7 +1376,7 @@ public void CallLastKeyboardMacro()
{
foreach (var recordedKey in _keyboardMacro)
{
Handle(recordedKey.Item1, recordedKey.Item2);
Handle(recordedKey);
}
}
#endregion
Expand Down Expand Up @@ -1522,7 +1522,7 @@ public void Handle(ConsoleKeyInfo keyInfo)

// Record the keypress if macro is enabled
if (_keyboardMacroRecording)
_keyboardMacro.Add((KeyInputName, KeyControlChar));
_keyboardMacro.Add(keyInfo);

// Do the job in internal overload
Handle(KeyInputName, KeyControlChar);
Expand Down

0 comments on commit a5e3dc7

Please sign in to comment.