JavaScript: keySequence