I've been noticing some interesting behavior with my iPad+Bluetooth Keyboard in vBulletin's WYSISYG editor. When I have caps lock on, the B, U, and I keys create vBulletin bold, underline, and italic tags, respectively. They insert both the opening and closing tag, and leave the cursor in the middle. Holding down shift and typing the same letter obviously doesn't do the same, and the vBulletin editor doesn't respond to any Ctrl or ⌘ key combinations. I can't get the on-screen keyboard to emulate the behavior either, even with double-tap caps lock on.
That got me curious about what effect Caps Lock has on Mobile Safari's keypress
events, so I did some experimenting. What I found was a rabbit's warren of browser-specific implementation discrepancies as to how keypress
events are constructed by different browsers. I originally tracked all three keyboard events (keydown
, keypress
, keyup
), but got so confused that I turned off the keydown
and keyup
handlers to focus on keypress
.
Interesting findi