Open
Description
Created by: slu4coder
Hi guys,
thanks for your excellent work on Processing 4. Sorry to report this annoying issue making it essentially impossible to detect the difference between SHIFT and PAGE_UP when using the P2D renderer. Problem: Both use keyCode = 16 :-(
This is not a problem under the DEFAULT renderer. It uses keyCodes 33-35 for HOME/END/PG_UP/PG_DN and 16 for SHIFT.
P2D however uses keyCodes 2, 3, 16(?) and 11 for the above keys and again 16 for SHIFT.
Btw, I am typing on a German keyboard but for the keys involved that shouldn't make any difference, I guess.
Good luck! slu4.
void setup() { size(200, 200, P2D); }
void draw() {}
void keyPressed() { println(key, int(key), key==CODED, keyCode); }
Activity
processing-bot commentedon Jun 20, 2023
Created by: Chirimen-Jako
I was also trying to submit the exact same issue, but I'm adding it here since I found this report. I am using the P3D renderer and a Japanese keyboard. Like slu4coder, I cannot distinguish between the [Shift] key and the [Page Up] key because they both return the same keyCode 16.
Additionally, I would like to ask if this issue is dependent on the hardware type of the keyboard.
processing-bot commentedon Jun 21, 2023
Created by: Chirimen-Jako
I found a workaround.
processing-bot commentedon Jul 16, 2023
Created by: benfry
Ok, these should be getting mapped properly to the same values as in the Java2D renderer.
SHIFT
andPAGE_UP
keys using the same keyCode #1033