yields/k — pull request #16 by dandean (2013-09-29 18:45:57+00:00)
Title: Prevent shortcuts w/o modifiers from matching when modifiers pressed

Here's an example of how the current functionality is broken:

```js
k('r', function() {
console.log('r');
});

k('shift + r', function() {
console.log('shift + r');
});

// Press "r" – correct:
// -> "r"

// Press "shift + r" – broken:
// -> "shift + r"
// -> "r"
```

The current implementation is broken because `invoke` defaults to `true`, and since `mlen` is `0`, there is never an opportunity to set `invoke` back to `null`:

https://github.com/yields/k/blob/master/proto.js#L68

This patch simply breaks out of the loop if modifiers are pressed but the current handler in the loop has none defined.