Skip to content

Commit

Permalink
logging 2
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Sep 29, 2024
1 parent 394d5a2 commit 8109e3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void WriteHotkey(HotkeyID hotkey, bool released) {
writer.Write(released);
});
LogVerbose($"Sent message Hotkey: {hotkey} ({(released ? "released" : "pressed")})");
Console.WriteLine(Environment.StackTrace);
}
public void WriteCommandAutoCompleteRequest(int hash, string commandName, string[] commandArgs, string filePath, int fileLine) {
QueueMessage(MessageID.RequestCommandAutoComplete, writer => {
Expand Down
2 changes: 2 additions & 0 deletions Studio/CelesteStudio/Editing/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ protected override void OnKeyDown(KeyEventArgs e) {
(Settings.Instance.SendInputsOnCommands && !isActionLine && !isComment);

Console.WriteLine($"Key down sending: {Document.Caret} '{Document.Lines[Document.Caret.Row]}' | {isActionLine} {isComment} {isTyping} => {sendInputs} ({Settings.Instance.SendInputsOnActionLines} {Settings.Instance.SendInputsOnComments} {Settings.Instance.SendInputsOnCommands} | {Settings.Instance.SendInputsTypingTimeout}) [{DateTime.UtcNow - lastModification} | {e.Key} {e.Modifiers} '{e.KeyChar}']");
Console.WriteLine($"1st down: {Settings.Instance.SendInputsToCeleste} && {CommunicationWrapper.Connected} && {!isTyping} && {sendInputs}");
if (Settings.Instance.SendInputsToCeleste && CommunicationWrapper.Connected && !isTyping && sendInputs && CommunicationWrapper.SendKeyEvent(e.Key, e.Modifiers, released: false)) {
e.Handled = true;
return;
Expand Down Expand Up @@ -1131,6 +1132,7 @@ protected override void OnKeyDown(KeyEventArgs e) {
}

// If nothing handled this, and it's not a character, send it anyway
Console.WriteLine($"2nd down: {Settings.Instance.SendInputsToCeleste} && {CommunicationWrapper.Connected} && {!isTyping} && {!sendInputs} && {!e.Handled} && {e.KeyChar == ushort.MaxValue}");
if (Settings.Instance.SendInputsToCeleste && CommunicationWrapper.Connected && !isTyping && !sendInputs && !e.Handled && e.KeyChar == ushort.MaxValue && CommunicationWrapper.SendKeyEvent(e.Key, e.Modifiers, released: false)) {
e.Handled = true;
return;
Expand Down

0 comments on commit 8109e3c

Please sign in to comment.