View previous topic :: View next topic |
Author |
Message |
reverser69 Expert Cheater Reputation: 0
Joined: 03 Sep 2014 Posts: 106
|
Posted: Wed Mar 10, 2021 3:11 am Post subject: [?] check if multiple keys are down with getasynckeystate |
|
|
hi all
how can I check for example "ctrl+X" or "shift+X" with getasynckeystate in auto assembler?
|
|
Back to top |
|
|
sbryzl Master Cheater Reputation: 6
Joined: 25 Jul 2016 Posts: 252
|
Posted: Wed Mar 10, 2021 11:40 am Post subject: |
|
|
Is it 32 or 64 bit and doing injection or createthread?
|
|
Back to top |
|
|
reverser69 Expert Cheater Reputation: 0
Joined: 03 Sep 2014 Posts: 106
|
Posted: Thu Mar 11, 2021 5:01 am Post subject: |
|
|
currently, it's createthread but I'd love to know both approaches. I know how to implement one key but for two keys, I wonder do I have to call getasynckeystate twice or once with extra parameters.
|
|
Back to top |
|
|
sbryzl Master Cheater Reputation: 6
Joined: 25 Jul 2016 Posts: 252
|
Posted: Thu Mar 11, 2021 6:43 am Post subject: |
|
|
It takes 1 parameter and returns 1 value so you need to do it twice then bitwise and the values together.
Code: | mov rcx,10 // shift key
call checkeyst
mov rcx,11 // ctrl key
call checkeyst
jmp // to original code or do other custom code
checkeyst:
sub rsp,20
call GetAsyncKeyState
mov [keyUDtst],rax
mov rcx,58 // x key
call GetAsyncKeyState
and rax,[keyUDtst]
add rsp,20
test rax,8000
jnz bthkeydown
ret
bthkeydown:
//both keys are down, Go
lea rax,[rax] // insert custom code
ret
align 8
keyUDtst: |
|
|
Back to top |
|
|
reverser69 Expert Cheater Reputation: 0
Joined: 03 Sep 2014 Posts: 106
|
Posted: Thu Mar 11, 2021 7:50 am Post subject: |
|
|
thx
+1
|
|
Back to top |
|
|
angelbabie How do I cheat? Reputation: 0
Joined: 11 Mar 2021 Posts: 2
|
Posted: Thu Mar 11, 2021 9:59 pm Post subject: |
|
|
thanks.. helpful, so amazing.
play 2 player games with your kids. 2player.co
|
|
Back to top |
|
|
|