Is there a way to improve a large if/else or switch/case block?
<p>I'm refactoring some javascript to use jQuery and one of the events looks something like this</p>

<pre><code>document.onkeyup = function keyUp(e) {

if (e.keyCode == 70) { // 'f'
    //Do something
}
else if (e.keyCode == 78) { // 'n'
    //Do something else
} ...
</code></pre>

<p>Unfortunately the things done in the cases aren't as similar or as simple as those in <a href="http://stackoverflow.com/questions/3640843/refactoring-a-large-block-of-chained-if-else-statements">this question</a>. Is there a better way to write this instead of a massive hard-coded if/else or switch/case statement? </p>
