openlayers/ol3 — pull request #1001 by elemoine (2013-09-12 13:23:46+00:00)
Title: Don't include keyboard interactions by default

This is meant to be a starting point for discussion (I'm in favor of the change but open to discussion).

In my opinion, the keyboard interactions are best suited for a full screen map. It is not that well suited for a small map in a page with a lot of content. In this situation, I think the expected behavior is for the up/down arrows to scroll the page.

Disabling the keyboard interactions only takes a bit of effort, but discovering how to do this takes more effort. For someone new to the library, they won't necessarily have any clue what is causing the map behavior. There is currently no documentation on interactions (this is a temporary problem). Even with documentation, it would take some time to find the appropriate function (`ol.interaction.defaults`) and understand its usage. Because this search is motivated by something the user did not want in the first place, I think this is likely to lead to frustration.

I think it should be more straightforward to provide documentation on how to enable the keyboard interaction (were it disabled by default). A simple example could demonstrate this. And even if the search for documentation takes the same amount of time, I believe there is less likelihood of frustration searching for something you want to add rather than something you want to remove.

If people agree that the keyboard interaction(s) should not be enabled by default, we have two options. 1) Change the `keyboard` option from `true` to `false` in the interaction defaults or 2) remove the `keyboard` option altogether.

Alt 0 is do nothing (enable the keyboard interactions by default). If we change this, here's what enabling the keyboard interactions look like:

Alt 1 (change `keyboard` option to `false`):
```js
var map = new ol.Map({
interactions: ol.interactions.defaults({keyboard: true})
});
```

Alt 2 (remove `keyboard` option):
```js
var map = new ol.Map({
interactions: ol.interactions.defaults().extend([
new ol.interaction.KeyboardPan(),
new ol.interaction.KeyboardZoom()
])
});
```