Is there any way or command to send special key to system? Cross Platform?
for example i want to send Control + L
or Scroll Lock
or Numlock
etc...
Thank You!
Send Special key to system?
Re: Send Special key to system?
Windows only:
Bernd
Code: Select all
Dim SendInputData.INPUT(3)
; press CONTROL
SendInputData(0)\type = #INPUT_KEYBOARD
SendInputData(0)\ki\wVK = #VK_CONTROL
; press l
SendInputData(1)\type = #INPUT_KEYBOARD
SendInputData(1)\ki\wVK = #VK_L
; release l
SendInputData(2)\type = #INPUT_KEYBOARD
SendInputData(2)\ki\dwFlags = #KEYEVENTF_KEYUP
SendInputData(2)\ki\wVK = #VK_L
; release CONTROL
SendInputData(3)\type = #INPUT_KEYBOARD
SendInputData(3)\ki\dwFlags = #KEYEVENTF_KEYUP
SendInputData(3)\ki\wVK = #VK_CONTROL
SendInput_(1, @SendInputData(0), SizeOf(INPUT))
Delay(30)
SendInput_(1, @SendInputData(1), SizeOf(INPUT))
Delay(200)
SendInput_(1, @SendInputData(2), SizeOf(INPUT))
Delay(30)
SendInput_(1, @SendInputData(3), SizeOf(INPUT))
Delay(30)