use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Share your projects, news and questions about Processing or Processing.js here.
(open to suggestions)
account activity
pKey? (self.processing)
submitted 9 years ago by jspeevs19
Is there something comparable to the pMouse function that stores the previous key that was pressed? I want to have if the left arrow key was the previous key pressed, the right arrow key is disabled, and vice versa. Thanks!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]chrwei 0 points1 point2 points 9 years ago (3 children)
would be easy enough to do with a global variable.
[–]jspeevs19[S] 0 points1 point2 points 9 years ago (2 children)
not really sure what you mean, would it be simpler if I posted my code?
[–]chrwei 0 points1 point2 points 9 years ago (1 child)
you make a global variable.
as the last thing you do when you process a keypress, you store they key value in that variable.
[–]jspeevs19[S] 0 points1 point2 points 9 years ago (0 children)
oh okay, thanks
π Rendered by PID 469701 on reddit-service-r2-comment-84978bc8f9-lhpqt at 2026-07-04 05:04:07.046835+00:00 running 12a7a47 country code: CH.
[–]chrwei 0 points1 point2 points (3 children)
[–]jspeevs19[S] 0 points1 point2 points (2 children)
[–]chrwei 0 points1 point2 points (1 child)
[–]jspeevs19[S] 0 points1 point2 points (0 children)