|
Author |
Topic: text input (Read 380 times) |
|
_cory
|
text input
« on: Mar 3rd, 2003, 5:19pm » |
|
i'm trying to write a tool for text visualization and i'm hoping to use keyboard input (i.e. typing) as the primary means of input. i've done a simple 2d prototype using a java applet/canvas and text events. I was hoping to make a better version with proce55ing but have only found the key,keyPressed and keyReleased code for getting text input. When i use these in a loop like so if(keyPressed){ story = story + char(key); } the applet seems to skip a lot of characters (i think when i type the key isn't pressed long enough to register inbetween redraws, but i'm just guessing). Is there a better way to do this, or is there an easy way to integrate the java applet proce55ing generates into a canvas so i can use a real text field (with cut-and-paste capabilities) for input?
|
|
|
|
_cory
|
Re: text input
« Reply #2 on: Mar 3rd, 2003, 6:02pm » |
|
ahh. overloading the keyPressed() method. thanks, works like a charm.
|
|
|
|
|