key release not working

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tatagi
Posts: 181
Joined: 23 Aug 2018, 11:17

key release not working

18 Apr 2021, 01:06

this is odd or I miss out on something


simple script here

Code: Select all

capslock & space
sleep 50
ret := ime_check("a")
if ime_check("a") = 0
{
send {vk15}
send {capslock up}
}
return

but the capslock refuses to get released

did I do something wrong?
Rohwedder
Posts: 7644
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: key release not working

18 Apr 2021, 03:47

Hallo,
I am missing two colons at line 1 and the definition of the function ime_check()
Here, CapsLock = vk14. vk15 does not exist in my german keylayout.
tatagi
Posts: 181
Joined: 23 Aug 2018, 11:17

Re: key release not working

18 Apr 2021, 04:39

Rohwedder wrote:
18 Apr 2021, 03:47
Hallo,
I am missing two colons at line 1 and the definition of the function ime_check()
Here, CapsLock = vk14. vk15 does not exist in my german keylayout.
hello and thank you for the rep

"vk15" only exists in korean keyboard, which toggles between english/korean keyboard.

and the script defines when to send it, (it sends vk15 only if current keyboard is english
the full script is much longer, but it is not relevant to what I am trying to ask here

I am about to add new action in the script

if pressing vk15 twice, it should just press "vk15" , so first I must release capslock physically or programmatically and autohotkey can step in to help here.
Rohwedder
Posts: 7644
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: key release not working

18 Apr 2021, 05:11

Perhaps this helps:
CapsLock and IME. https://www.autohotkey.com/docs/KeyList.htm#IME
or:

Code: Select all

SetCapsLockState, Off
tatagi
Posts: 181
Joined: 23 Aug 2018, 11:17

Re: key release not working

18 Apr 2021, 06:09

Rohwedder wrote:
18 Apr 2021, 05:11
Perhaps this helps:
CapsLock and IME. https://www.autohotkey.com/docs/KeyList.htm#IME
or:

Code: Select all

SetCapsLockState, Off
hello, I don't seem to fully understand what they say :/

I think I found a workaround and I might need your help 🙏

1. if I press capslock + a , it then sends "keyofchoice" the moment I release capslock
2. if I press capslock + aa( a twice), it then sends "keyofchoice" right away.

is this theoretically possible? defining diffrent action to same hotkey combination depending on when capslock is pressed.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: jaka1, mikeyww and 348 guests