Holding down shift + space not working

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
maffle
Posts: 4
Joined: 12 Mar 2016, 08:07

Holding down shift + space not working

26 May 2024, 02:46

Hello,

I want this simple behavior, that when I hold down space, it would simulate holding down shift + space and when releasing it release both keys again. Tried this which doesnt work:

Code: Select all

space::Send "{Shift Down}{Space Down}{Space Up}{Shift Up}"
this is also not working:

Code: Select all

space::Send "+Space"
It seems to randomly release the keys when holding down the space button.

[Mod edit: Added [code][/code] tags.]
User avatar
Seven0528
Posts: 413
Joined: 23 Jan 2023, 04:52
Location: South Korea
Contact:

Re: Holding down shift + space not working

26 May 2024, 03:31

 If you need to continuously press the Space key, it is essential to minimize the part where the Shift state is sent.
The reason is simple. If the Space key is continuously pressed, a signal is generated every about 20ms.
If signals for pressing and releasing the Shift key are sent too frequently, it inevitably increases the likelihood of malfunction.

Code: Select all

#Requires AutoHotkey v2.0
#SingleInstance Force

var := false
#HotIf (!var)
Space::  {
    global var := true
    send("{Blind}{LShift down}{Space Down}")
}
#HotIf (var)
*~Space up::  {
    global var := false
    if (!getKeyState("LShift", "P"))
        send("{Blind}{LShift up}")
}
#HotIf
  • English is not my native language. Please forgive any awkward expressions.
  • 영어는 제 모국어가 아닙니다. 어색한 표현이 있어도 양해해 주세요.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: WarlordAkamu67 and 32 guests