Question

I'm using keyboard events ('keydown' and 'keyup') to detect exactly when the user presses or releases the shift key.

In Safari 3+, this works fine. However, Safari 2.0 doesn't seem to fire keyboard events for the shift key—in fact, it doesn't seem to fire events for any of the modifier keys...

Does anyone know how I might deal with or work around this problem?

(In this particular case, I only need to work with Safari, as I'm using this code in a Dashboard widget.)

Thanks,

Steve

Was it helpful?

Solution

Safari 2 does not fire key events for any modifier keys (the code wasn't added until the S3 cycle) -- the best you could do is look at the modifier flags on any events you are processing.

Failing that, remember that Safari 3+ exist on tiger, and iirc are part of 10.4.11 so you should really be able to rely on the existence of S3+

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top