I am sorry you are experiencing this behavior. However by providing me only the code I am not able to investigate further. This is a standard key press method which is supposed to work without any issues. I have tested it on my end and it is working fine.
Please make sure you are using the latest Test Studio (version 2014.3.903) and give it a try. If you continue experiencing the behavior please provide me with the test and the application so I can assist you further.