Page 1 of 1

Two profile script not working well

Posted: 29 Apr 2024, 11:35
by Playa 01
I've been using a script occasionally for years. Although I sometimes change it and use it for different tasks, I use it mostly with the PS2 emulator (PCSX2). There are two different profiles and I switch between them with the Caps Lock key. This is its current state:

Code: Select all

profile := 1 ;default
$CapsLock::Profile := 2

#If Profile = 2
$CapsLock::Profile := 1
w::PgUp
s::PgDn
Shift::Up
LCtrl::Down
Space::9
Tab::C
RCtrl::LButton
RButton::O
But my only problem is that when I change profiles while holding down a button, the button stays stuck. For example, if I press the Caps Lock key while pressing the W key, W gets stuck. I have to change the profile again and press the W key one more time.

In addition, I want it to perform its own function when I press the Caps Lock key. I don't know much about writing code, I tried a lot of things but either I didn't understand or it didn't work. So I need someone to write an example.

Thank you.