Forum Discussion

manojgovikari's avatar
manojgovikari
Contributor
13 years ago

How to Send "Right Alt" key using shell object.

Hi,

As per our requirement we need to press Right Alt key while script is running.

We are using code as below.

Set objshell = CreateObject("WScript.Shell")

objshell.sendkeys "RALT"



the above code is not working. we also tried with "RAlt", "[RALT]", "Right Alt", "RAltGr"... but none of them worked.



Please let me know the correct key for select the right alt key button on keyboard.



Thanks,

12 Replies

  • Thank you very much for your support. I was able to change to HANGUL. Do we have key codes for each input method like this? Suppose i would like to change to English input method.. so which virtual key code needs to be used? please share reference link if we have any key codes for each language input methods.
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Manoj,



    I'm glad I could help!



    Unfortunately, I don't know much about Korean keyboards, but from what I've read, I believe that VK_HANGUL is used to toggle between Korean and English. So, you can probably use the same key code to switch back to English.



    If you have many input languages installed, I'd actually recommend using the specialized aqEnvironment.SetKeyboardLayout operation to activate the needed language. It will be more robust and less obscure that using key codes.