From c42fd80b7463cf5b69251ab8656567581c574ee6 Mon Sep 17 00:00:00 2001
From: Albert Graef <aggraef@gmail.com>
Date: Thu, 10 Sep 2020 08:43:11 +0200
Subject: [PATCH] Add a warning about the changed hotkey for temporary run
 mode.

---
 pd/src/g_editor.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 01e87850c..78b76cb59 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -3520,6 +3520,8 @@ static double canvas_upclicktime;
 static int canvas_upx, canvas_upy;
 #define DCLICKINTERVAL 0.25
 
+static int ctrl_runmode_warned;
+
     /* mouse click */
 void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
     int mod, int doit)
@@ -3691,6 +3693,14 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
     if (y)
     {
 
+        /* check for ctrlmod click and give a warning once in the console that
+           the hotkey for temporary runmode has changed */
+        if (!ctrl_runmode_warned && ctrlmod && !rightclick && doit) {
+          post("\nwarning: The hotkey for temporary run mode has changed. "
+               "Please press Alt instead of Ctrl to enable it.\n");
+          ctrl_runmode_warned = 1;
+        }
+
         // if we are right-clicking
         if (rightclick)
             canvas_rightclick(x, xpos, ypos, y);
-- 
GitLab