Bugs item #1728405, was opened at 2007-05-30 17:39 Message generated for change (Comment added) made by sistisette You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1728405...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: v0.40.2 Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Matteo Sisti Sette (sistisette) Assigned to: Hans-Christoph Steiner (eighthave) Summary: keyname issues in Windows
Initial Comment: I only have tested this on Windows XP.
The [keyname] doesn't handle correctly at least the following keys: - space bar - enter - escape
It doesn't correctly return the key name on the right outlet.
With the space bar key, it returns "symbol ", which probably is "symbol" plus a space, but however, "symbol space" or something like that would be more appropriate, since in PD a space in a message is equivalent to just nothing and there is no way to handle it as far as I understand.
With enter key, it seems to output "symbol " followed by the actual newline character (appears as a square in the output window in Windows)
With the escape key, it has a peculiar and incoherent behaviour: on keydown, it outputs "symbol " plus some special character (and outputs a 1 on the left outlet), while on keyup it outputs "symbol Escape" (and a 0 on the left outlet) which is correct.
I think all keys should have a name. However, if we accept that some keys don't have a name, I think [keyname] shouldn't output anything when those keys are pressed or releases, just like [key] and [keyup] don't output anything when an unrecognized key is pressed.
----------------------------------------------------------------------
Comment By: Matteo Sisti Sette (sistisette) Date: 2009-04-06 18:23
Message: Exactly like bug 1728414, the fix hasn't been included into PD Vanilla almost one year later.
I don't know whether it is normal and, above all, I wonder whether it is correct to CLOSE the bug report before the fix is included in Vanilla.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2008-05-09 21:54
Message: Logged In: YES user_id=27104 Originator: NO
This is fixed by patch #1704511 and included in branches/pd-extended/0.40
http://sourceforge.net/tracker/index.php?func=detail&aid=1704511&gro...
----------------------------------------------------------------------
Comment By: Matteo Sisti Sette (sistisette) Date: 2007-05-30 23:39
Message: Logged In: YES user_id=1709568 Originator: YES
Thanks fbar, now I understand the behaviour of keyname better. However, I don't see the coherence between how it behaves with keys such as "Left", "Shift_R", "F1" on one side, and how it behaves with keys such as space, tab, backspace on the other side.
With ENTER and ESC and BACKSPACE there's clearly a bug however.
Note that ESC and BACKSPACE output different symbols on keyup and keydown.
Also, I don't think it is "acceptable" that a symbol exsists that cannot be written literally (either with or without some kind of escape sequence).
Let's suppose that @ is the <mistery char for space> and that ç is the <mistery char for tab>. For a one-item select you can use your "makefilename %c" trick, but you can't write a [select @ ç foo bar] for example.
----------------------------------------------------------------------
Comment By: Frank Barknecht (fbar) Date: 2007-05-30 21:33
Message: Logged In: YES user_id=569446 Originator: NO
Attached patch shows that Pd recognizes most whitespace keys correctly. Also Backspace and Escape act differently. The only keys I couldn't make to work were the RETURN key and other special keys like HOME, END or PageUP.
Note that you need to create the symbols for the special characters inside Pd using a special method: [makefilename %c] and the ASCII code.
"symbol <mystery_char_for_space>" is something different
from "symbol " (2 spaces!) and also different from "symbol 32" or "symbol SPACE". I believe, the way keyname handles this ATM is okay.
File Added: keyname-test.pd
----------------------------------------------------------------------
Comment By: Matteo Sisti Sette (sistisette) Date: 2007-05-30 18:08
Message: Logged In: YES user_id=1709568 Originator: YES
Also BACKSPACE behaves exactly like escape
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1728405...