Refactored inputAction() so that the enter key is handled better for Nokia devices.