This way works but it strikes me as working too hard.
Question: How do you determine which key has been pressed?
;(function() {
var Variables = {}
Variables.slash = false
$('[name=myName]').keypress(keypress)
function keypress(myEvent) {
if (myEvent.which === 47) {
Variables.slash = true
}
}
$('[name=myName]').keyup(keyup)
function keyup(myEvent) {
if (Variables.slash) {
Variables.slash = false
}
}
})()