JU5TDIE / Lester-Ver2.0

GTA Online Heist Hacking(Minigame) Macro
7 stars 3 forks source link

Rebinding keybinds. #1

Closed ElectroBytezLV closed 3 years ago

ElectroBytezLV commented 3 years ago

Hello. I'd like you to provide us with some documentation regarding on how to change the default keybinds, or you could implement a system, which allows you to change the keybinds from the .exe file. I'd like to change the keybinds to CTRL+F5 for example, instead of just F5 on all of the hacks. For example, on AHK the CTRL button is also known as "^", so I'm not sure which ones are here, on Python. I do know how to access the source code and such, of course, but as I mentioned above, don't know the correct keybinds.

JU5TDIE commented 3 years ago

Thank you for the issue!

I will add .ini or .json file, which is for key binds and other settings. And the format of CTRL+F5 in pynput is <ctrl>+<F5>; just put < and > on the first and last place of key.

ElectroBytezLV commented 3 years ago

Thank you for the issue!

I will add .ini or .json file, which is for key binds and other settings. And the format of CTRL+F5 in pynput is <ctrl>+<F5>; just put < and > on the first and last place of key.

So if I wanted to change the activation hotkey in the "main.py" file, it should look like this:

    elif k == "<ctrl>+<F5>":
        thread = Thread(target = casinofingerprint.main)
        thread.start()

    elif k == "<ctrl>+<F6>":
        thread = Thread(target = casinokeypad.main)
        thread.start()

    elif k == "<ctrl>+<F7>":
        thread = Thread(target = cayofingerprint.main)
        thread.start()

    elif k == "<ctrl>+<F8>":
        thread = Thread(target = cayovoltage.main)
        thread.start()
JU5TDIE commented 3 years ago

Check the new script, i just fixed it yesterday

Edited : the new script is this:

if check_window():
        with pynput.keyboard.GlobalHotKeys({
                '<F4>': shutdown,
                '<F5>': casino_fingerprint,
                '<F6>': casino_keypad,
                '<F7>': cayo_fingerprint,
                '<F8>': cayo_voltage}) as h:
            h.join()

and you should edit like this:

if check_window():
        with pynput.keyboard.GlobalHotKeys({
                '<ctrl>+<F4>': shutdown,
                '<ctrl>+<F5>': casino_fingerprint,
                '<ctrl>+<F6>': casino_keypad,
                '<ctrl>+<F7>': cayo_fingerprint,
                '<ctrl>+<F8>': cayo_voltage}) as h:
            h.join()