Difference between [Return] and [Enter] Key Shortcut Action

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
d629039
Posts: 3
Joined: Fri Mar 16, 2018 11:21 am

Difference between [Return] and [Enter] Key Shortcut Action

Post by d629039 » Fri Mar 16, 2018 11:36 am

Hello,

For a test i need to press [Return] (from the left of the keyboard) and [Enter] (from the numpad), but the Key Shortcut Action doesn't know the difference between the two.

How can I distinguish them ?

Thank you.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Difference between [Return] and [Enter] Key Shortcut Action

Post by odklizec » Mon Mar 19, 2018 8:57 am

Hi,

I'm afraid, it's most probably not possible to use Shortcut action in recording module, to distinguish between these to keys. The thing is, that recording action always records "Enter" shortcut for both keys, but actual code behind the action is System.Windows.Forms.Keys.Return ;)

However, it should be possible to achieve this from code:
System.Windows.Forms.Keys.Return - Enter from main keyboard
System.Windows.Forms.Keys.Enter - Enter from numpad
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration