Binding keypress event on knockoutjs, observable not populated

Viewed 16916

Need a little help with knockoutjs and binding a keypress event. I'm trying to hook up knockout so that I pick up on the enter keypress from within a text box. So I can perform the same action as clicking a button. Its a little tricky to explain but hopefully this JsFiddle will demonstrate what I'm trying to achieve.

http://jsfiddle.net/nbnML/8/

The problem I have is that observable value is not getting updated and I think its something to do with an observable not being updated until focus moves away from the textbox?

Any solutions to this problem.

Thanks!

2 Answers
Related