Ever wanted a handy list of common keycodes and the keys they represent? Use `Foundation.Keyboard.keys`. This is an object containing key/value pairs of the most frequently used keys in our framework.
-Want to manage your own keyboard inputs? No problem! Within your `.on('key**')` callback, call `Foundation.Keyboard.parseKey(event)` to get a string of what key was pressed, e.g. `'TAB'` or `'ALT_X'`.
+Want to manage your own keyboard inputs? No problem! Within your `.on('key**')` callback, call `Foundation.Keyboard.parseKey(event)` to get a string of what key was pressed, e.g. `'TAB'` or `'ALT_X'`.
+You can also use this function outside of the Foundation components in your own JavaScript code.
What if you want to know if there's focusable elements somewhere on a page? Instead of writing that function and selector yourself, just use:
```js
'TAB': 'next'
});
...//in event callback
-// `this` refers to the current plugin instance
-Foundation.Keyboard.handleKey(event, this, {
+Foundation.Keyboard.handleKey(event, 'pluginName', {
next: function(){
//do stuff
}
});
```
+There are also the functions `handled` and `unhandled` where you can place any code that shall always be executed after the key event has been handled or not.
+
+If you want to use your own key bindings, you can simply call the `Foundation.Keyboard.register` function even after Foundation has been initialized.
## MediaQuery
`js/foundation.util.mediaQuery.js`