Archive for July, 2009

Javascript: keyCode versus charCode

Javascript key press events have both a keyCode and a charCode property. These are mutually exclusive – whenever one is non-zero the other is zero.

Which one is set depends on the type of event: keydown and keyup events give one events with keyCode set (they produce corresponding character) whilst keypress events give one events with charCode set.

Add comment July 26, 2009


Meta

Facets

Add new tag AOP apt aspect oriented programming assumes knowledge autiobiographical bash scripts bell books clarity code samples configuration console emacs for the benefit of google functional programming graphical design hacks higher-order functions howtos intention revealing programming keyboard links linux note to self opinions parsing patterns philosophising philosophizing programming python random ideas refactoring removing packages stories succinct svn systems stuff theoretical philosophizing typing vim viper work ethic you probably don't want to read this

Archives

Pages

 

July 2009
M T W T F S S
« May   Aug »
 12345
6789101112
13141516171819
20212223242526
2728293031