Steve Harrison
Steve Harrison

Reputation: 125640

Keyboard Events for Modifier Keys in Safari 2.0

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.)

Upvotes: 0

Views: 426

Answers (1)

olliej
olliej

Reputation: 36803

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+

Upvotes: 2

Related Questions