From 7c82d35428eaa763aae308017eff14995ef3bef5 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Tue, 8 Dec 2015 18:58:52 -0500 Subject: [PATCH] small code cleanup, improved comment for canvas_key --- pd/src/g_editor.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index 7f412d38e..763ff50c4 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -4983,21 +4983,21 @@ void canvas_displaceselection(t_canvas *x, int dx, int dy) } /* this routine is called whenever a key is pressed or released. "x" - may be zero if there's no current canvas. The first argument is true or - false for down/up; the second one is either a symbolic key name (e.g., - "Right" or an Ascii key number. The third is the shift key. + may be zero if there's no current canvas. + Arguments: + 0) 0 = key up, nonzero = key down + 1) either a symbolic key name (e.g., "Right") or an Ascii key number + 2) shift key: nonzero = pressed + 3) focus (not sure what this does) + 4) autorepeat: 0 = off, nonzero = on In Pd-L2Ork additional argument is to determine whether we're pasting to ignore unnecessary getscroll calls at paste time */ void canvas_key(t_canvas *x, t_symbol *s, int ac, t_atom *av) { - static t_symbol *keynumsym, *keyupsym, *keynamesym; - static t_symbol *keynumsym_a, *keyupsym_a, *keynamesym_a; - int keynum; + static t_symbol *keynumsym, *keyupsym, *keynamesym, + *keynumsym_a, *keyupsym_a, *keynamesym_a; t_symbol *gotkeysym; - - int down, shift; - int focus = 1; - int autorepeat = 0; + int keynum, down, shift, focus = 1, autorepeat = 0; tooltip_erase(x); -- GitLab