ExtendedKeyInput

Check current state of a virtual key (VK) on the keyboard instead of game-buttons with the key-input event-command when variable #3340 (ID can be changed in the sourcecode of segment 2/2) is above 0 (containing a VK-ID). The command's target-variable will have a value of -1 if the defined key is being pressed.

Originally made and first released by bugmenot.

[Compatibility Warning] Do not use in combination with Keyboard Observator!

RPG2000
1.00UNKNOWN2000-05-072000-06-192000-07-112000-11-132000-11-152000-12-27
1.07
2001-05-05
1.10
2003-03-27
1.50
2003-06-25
1.51/1.52
2015-07-05
1.60
2015-09-15
1.61
2017-09-14
1.62
RPG2003
1.00UNKNOWN1UNKNOWN21.0.2.1
1.0.2.1
1.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.6.0
1.0.6.0
1.0.7.0
1.0.7.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414

Segment 1/2

Offsets

RPG2000
2000-12-27
1.07
2001-05-05
1.10
2003-03-27
1.50
2003-06-25
1.51/1.52
2015-07-05
1.60
2015-09-15
1.61
2017-09-14
1.62
00485BC9h
00084FC9h
00485AD9h
00084ED9h
0048AB29h
00089F29h
0048AC45h
0008A045h
004894B5h
000888B5h
00489E85h
00089285h
0048C54Dh
0008B94Dh

Sourcecode

			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__00485BD0h:
			MOV EDX, [0049AA04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __00485BE2h
			MOV ESI, EDI
__00485BE2h:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __00485BD0h
			POP EDI
			JMP __00485C21h
PROC__00485BEDh:
			MOV EAX, [0049ABA4h]
			MOV EAX, [EAX]
			CALL PROC__00469EE0h			; GetVariable
			CMP EAX, 0
			JG __00485C08h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__00485BB8h
			RET
PROC__00485C08h:
			PUSH EAX
			CALL PROC__00406804h			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __00485C1Bh
			XOR EAX, EAX
			DEC EAX
			JMP __00485C1Dh
__00485C1Bh:
			XOR EAX, EAX
__00485C1Dh:
			NOP
			NOP
			NOP
			RET
__00485C21h:
			(...)
			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__00485AE0h:
			MOV EDX, [0049AA04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __00485AF2h
			MOV ESI, EDI
__00485AF2h:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __00485AE0h
			POP EDI
			JMP __00485B31h
PROC__00485AFDh:
			MOV EAX, [0049ABA4h]
			MOV EAX, [EAX]
			CALL PROC__00469DE0h			; GetVariable
			CMP EAX, 0
			JG __00485B18h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__00485AC8h
			RET
PROC__00485B18h:
			PUSH EAX
			CALL PROC__00406804h			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __00485B2Bh
			XOR EAX, EAX
			DEC EAX
			JMP __00485B2Dh
__00485B2Bh:
			XOR EAX, EAX
__00485B2Dh:
			NOP
			NOP
			NOP
			RET
__00485B31h:
			(...)
			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__0048AB30h:
			MOV EDX, [0049FA04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __0048AB42h
			MOV ESI, EDI
__0048AB42h:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __0048AB30h
			POP EDI
			JMP __0048AB81h
PROC__0048AB4Dh:
			MOV EAX, [0049F8BCh]
			MOV EAX, [EAX]
			CALL PROC__0046EDD4h			; GetVariable
			CMP EAX, 0
			JG __0048AB68h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__0048AB18h
			RET
PROC__0048AB68h:
			PUSH EAX
			CALL PROC__00406824h			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __0048AB7Bh
			XOR EAX, EAX
			DEC EAX
			JMP __0048AB7Dh
__0048AB7Bh:
			XOR EAX, EAX
__0048AB7Dh:
			NOP
			NOP
			NOP
			RET
__0048AB81h:
			(...)
			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__0048AC4Ch:
			MOV EDX, [0049FA04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __0048AC5Eh
			MOV ESI, EDI
__0048AC5Eh:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __0048AC4Ch
			POP EDI
			JMP __0048AC9Dh
PROC__0048AC69h:
			MOV EAX, [0049F8BCh]
			MOV EAX, [EAX]
			CALL PROC__0046EEF0h			; GetVariable
			CMP EAX, 0
			JG __0048AC84h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__0048AC34h
			RET
PROC__0048AC84h:
			PUSH EAX
			CALL PROC__0040682Ch			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __0048AC97h
			XOR EAX, EAX
			DEC EAX
			JMP __0048AC99h
__0048AC97h:
			XOR EAX, EAX
__0048AC99h:
			NOP
			NOP
			NOP
			RET
__0048AC9Dh:
			(...)
			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__004894BCh:
			MOV EDX, [0049FA04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __004894CEh
			MOV ESI, EDI
__004894CEh:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __004894BCh
			POP EDI
			JMP __0048950Dh
PROC__004894D9h:
			MOV EAX, [0049F8BCh]
			MOV EAX, [EAX]
			CALL PROC__0046F034h			; GetVariable
			CMP EAX, 0
			JG __004894F4h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__004894A4h
			RET
PROC__004894F4h:
			PUSH EAX
			CALL PROC__00406834h			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __00489507h
			XOR EAX, EAX
			DEC EAX
			JMP __00489509h
__00489507h:
			XOR EAX, EAX
__00489509h:
			NOP
			NOP
			NOP
			RET
__0048950Dh:
			(...)
			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__00489E8Ch:
			MOV EDX, [004A0A04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __00489E9Eh
			MOV ESI, EDI
__00489E9Eh:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __00489E8Ch
			POP EDI
			JMP __00489EDDh
PROC__00489EA9h:
			MOV EAX, [004A0BC8h]
			MOV EAX, [EAX]
			CALL PROC__0046F614h			; GetVariable
			CMP EAX, 0
			JG __00489EC4h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__00489E74h
			RET
PROC__00489EC4h:
			PUSH EAX
			CALL PROC__00406848h			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __00489ED7h
			XOR EAX, EAX
			DEC EAX
			JMP __00489ED9h
__00489ED7h:
			XOR EAX, EAX
__00489ED9h:
			NOP
			NOP
			NOP
			RET
__00489EDDh:
			(...)
			XOR ECX, ECX
			INC ECX
			PUSH EDI
			XOR EDI, EDI
			INC EDI
__0048C554h:
			MOV EDX, [004A0A04h]
			MOV EDX, [EDX]
			TEST BYTE PTR [EDX+15Eh], CL
			JE __0048C566h
			MOV ESI, EDI
__0048C566h:
			INC EDI
			SHL ECX, 1
			CMP ECX, 8
			JLE __0048C554h
			POP EDI
			JMP __0048C5A5h
PROC__0048C571h:
			MOV EAX, [004A0BC8h]
			MOV EAX, [EAX]
			CALL PROC__0046F7CCh			; GetVariable
			CMP EAX, 0
			JG __00485C08h
			XOR EDX, EDX
			MOV EAX, EBX
			CALL PROC__0048C53Ch
			RET
PROC__00485C08h:
			PUSH EAX
			CALL PROC__00406848h			; user32::GetAsyncKeyState
			MOVSX EAX, AX
			TEST AH, 128
			JE __0048C59Dh
			XOR EAX, EAX
			DEC EAX
			JMP __0048C5A1h
__0048C59Dh:
			XOR EAX, EAX
__0048C5A1h:
			NOP
			NOP
			NOP
			RET
__0048C5A5h:
			(...)

Bytes

31C9 41 57 31FF 47 8B1504AA4900 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1A4AB4900 8B00 E8E742FEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E8F60BF8FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3
31C9 41 57 31FF 47 8B1504AA4900 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1A4AB4900 8B00 E8D742FEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E8E60CF8FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3
31C9 41 57 31FF 47 8B1504FA4900 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1BCF84900 8B00 E87B42FEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E8B6BCF7FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3
31C9 41 57 31FF 47 8B1504FA4900 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1BCF84900 8B00 E87B42FEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E8A2BBF7FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3
31C9 41 57 31FF 47 8B1504FA4900 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1BCF84900 8B00 E84F5BFEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E83AD3F7FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3
31C9 41 57 31FF 47 8B15040A4A00 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1C80B4A00 8B00 E85F57FEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E87EC9F7FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3
31C9 41 57 31FF 47 8B15040A4A00 8B12 848A5E010000 7402
89FE 47 D1E1 83F908 7EE6
5F EB34
A1C80B4A00 8B00 E84F32FEFF
83F800 7F0A
33D2 8BC3 E8B1FFFFFF
C3
50 E83A0CF8FF
0FBFC0 F6C480 7405
31C0 48 EB02
31C0 90 90 90 C3

Segment 2/2

Offsets

RPG2000
2000-12-27
1.07
2001-05-05
1.10
2003-03-27
1.50
2003-06-25
1.51/1.52
2015-07-05
1.60
2015-09-15
1.61
2017-09-14
1.62
004891E6h
000885E6h
004890F6h
000884F6h
0048E2F1h
0008D6F1h
0048E40Dh
0008D80Dh
0048CC81h
0008C081h
0048D68Dh
0008CA8Dh
0048FD55h
0008F155h

Sourcecode

			MOV EDX, 3340
			CALL PROC__00485BEDh
			XCHG EAX, ECX
			MOV EDX, 3340
			CALL PROC__00485AFDh
			XCHG EAX, ECX
			MOV EDX, 3340
			CALL PROC__0048AB4Dh
			XCHG EAX, ECX
			MOV EDX, 3340
			CALL PROC__0048AC69h
			XCHG EAX, ECX
			MOV EDX, 3340
			CALL PROC__004894D9h
			XCHG EAX, ECX
			MOV EDX, 3340
			CALL PROC__00489EA9h
			XCHG EAX, ECX
			MOV EDX, 3340
			CALL PROC__0048C571h
			XCHG EAX, ECX

Bytes

BA0C0D0000 E8FDC9FFFF
91
BA0C0D0000 E8FDC9FFFF
91
BA0C0D0000 E852C8FFFF
91
BA0C0D0000 E852C8FFFF
91
BA0C0D0000 E84EC8FFFF
91
BA0C0D0000 E812C8FFFF
91
BA0C0D0000 E812C8FFFF
91