Jump to content

send() a specific key, whatever is the keyboard layout


skijve
 Share

Recommended Posts

Hello guys,

Is it possible  to send()  a specific key on the keyboard whatever the keyboard layout is.

To be clear I don't want to send "A" because I know that, following locale, autoit will send the corect character.

I want to send a key for example in azertry :

image.thumb.jpeg.fe3bdf022f8331430ba7e1e54ea81d53.jpeg

but for qwertz :

image.jpeg.15dcb302d9850836fffd312a262e3f07.jpeg

 

Possible ?

 

Thx in advance guys,

Eva

Link to comment
Share on other sites

I tested on my french keyboard and I got the right character from scancode 53 (last key before right shift).  M key should be 50 according to this list.

#include <WinAPISys.au3>

Local $iVKey = _WinAPI_MapVirtualKey(53, $MAPVK_VSC_TO_VK)
_WinAPI_Keybd_Event($iVKey, 0)
_WinAPI_Keybd_Event($iVKey, $KEYEVENTF_KEYUP)

got the character é as it should be so I believe it should work for you...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...