Jump to content

Key combinations with LSHIFT, RALT etc.


Maxpilot
 Share

Recommended Posts

Hi,

I searched the forums for this but found nothing:

Is it possible to send key - combinations with LSHIFT, RSHIFT, LALT etc.? That means like pressing one of these buttons and simultaneously pressing lets say the key "a"?

This syntax

To hold a key down (generally only useful for games)

Send("{a down}") ;Holds the A key down

Send("{a up}") ;Releases the A key

does not function with LSHIFT, RSHIFT or keys like this. I tried for example:

send ("{{LSHIFT} down}")

(in my opinion exactly according to that syntax)

as well as

send ("{LSHIFT} down")

but nothing works.

Thanks in advance

Max

Link to comment
Share on other sites

Hi,

I searched the forums for this but found nothing:

Is it possible to send key - combinations with LSHIFT, RSHIFT, LALT etc.? That means like pressing one of these buttons and simultaneously pressing lets say the key "a"?

This syntax

does not function with LSHIFT, RSHIFT or keys like this. I tried for example:

(in my opinion exactly according to that syntax)

as well as

but nothing works.

Thanks in advance

Max

Search on send hold key down

You might get an answer, if you wade through all the pages.

You can try this testing script and follow the comments. Some things work, kind of.

Run("Notepad.exe")
WinWaitActive("Untitled - Notepad")

Send("abc   ")      ;Appears lower case
Send("{LSHIFT down}")

MsgBox(0, "", "wait")
;Type into Notepad  ;Appears upper case

;Press OK in MsgBox

Send("def   ")      ;Appears lower case
Send("{LSHIFT up}")

Send("+g+h+i   ")   ;Appears upper case

Send("{LSHIFT}")
Send("jkl   ")      ;Appears lower case

;Type into Notepad ;Appears upper case

;PRESS Right Shift button on keyboard
;Type into Notepad  ;still appears upper case

;PRESS Left Shift button once on keyboard
;Type into Notepad ; Appears lower case

The interesting thing here is having to press the left shift key once, to get the keyboard back to normal.

Link to comment
Share on other sites

Thanks a lot! Very interesting: All works as described in the script.

Didn't find anything else that helps. What I want to achieve is a remote control of the new helicopter - simulation "Black Shark" (via TCP), where there are a lot of key - combinations with left/right -shift, -alt and -ctrl. So it looks like I cannot do it with autoit.

Greetings

Max

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...