Mithril does not process the entire page and events for you. You can addEventListener for window.onkeydown , and inside this callback do what you need, for example, refresh the controller or redraw the page.
http://jsbin.com/hikinoza/1/edit
m.prop or m.withAttr are not related by themselves. Actual binding occurs when you specify some onXXX property for an object, such as
m('div', {onClick: myFunc})
This will attach the real onClick event to the real dom node div to be created.
source share