Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Joe Sleiman
5,921 Pointsdidn't understand
i didn't understand what means "keyup" "keydown" "keypress" ?? i understand that when i press and release it's keyup ( when i press without release it's keydown i try it on this project but the span didn't show till the length was more than 10 characters ) that what lead me to wonder??????
1 Answer
elk6
22,916 PointsHi Joe,
Keydown is when you press the key without releasing or before release. Keyup is when you release the key.
Keypress stands for a combination of the 2. Both the keyup as the keydown. However, in use it's very similar to keydown. Big difference is that keydown looks for an actual button being pressed and keypress looks for a character being inserted. Keypress will not work on shift or alt for example. The characters are different on all browsers though.
- Elian
Joe Sleiman
5,921 PointsJoe Sleiman
5,921 Pointskeypress??
elk6
22,916 Pointselk6
22,916 PointsAdded to answer. :)