From 27e05f64578758e0ce0ffd0dfc6a6369ecf37ba6 Mon Sep 17 00:00:00 2001
From: Miller Puckette <msp@ucsd.edu>
Date: Mon, 14 Jan 2008 10:26:57 -0800
Subject: [PATCH] improve cursor behavior when control key is pressed or
 released

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

diff --git a/src/g_editor.c b/src/g_editor.c
index 9f3097dec..a44d952a3 100644
--- a/src/g_editor.c
+++ b/src/g_editor.c
@@ -1564,6 +1564,12 @@ void canvas_key(t_canvas *x, t_symbol *s, int ac, t_atom *av)
         else if (!strcmp(gotkeysym->s_name, "Right"))
             canvas_displaceselection(x, shift ? 10 : 1, 0);
     }
+        /* if control key goes up or down, and if we're in edit mode, change
+        cursor to indicate how the click action changes */
+    if (x && keynum == 0 && x->gl_edit &&
+        !strncmp(gotkeysym->s_name, "Control", 7))
+            canvas_setcursor(x, down ?
+                CURSOR_RUNMODE_NOTHING :CURSOR_EDITMODE_NOTHING);
 }
 
 void canvas_motion(t_canvas *x, t_floatarg xpos, t_floatarg ypos,
-- 
GitLab