Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key error: DIK_LEFTBRACKET #60

Open
Thurion666 opened this issue Feb 9, 2022 · 1 comment
Open

Key error: DIK_LEFTBRACKET #60

Thurion666 opened this issue Feb 9, 2022 · 1 comment

Comments

@Thurion666
Copy link

INFO     RELEASE=v19.05.15-alpha-18
INFO     PATH_LOG_FILES=None
INFO     PATH_KEYBINDINGS=None
INFO     KEY_MOD_DELAY=0.01
INFO     KEY_DEFAULT_DELAY=0.2
INFO     KEY_REPEAT_DELAY=0.1
INFO     FUNCTION_DEFAULT_DELAY=0.5
INFO     SCREEN_WIDTH=1920
INFO     SCREEN_HEIGHT=1080
INFO     get_latest_log=C:\Users\Thurion\Saved Games\Frontier Developments\Elite Dangerous\Journal.220209140252.01.log
INFO     get_latest_keybinds=C:\Users\Thurion\AppData\Local\Frontier Developments\Elite Dangerous\Options\Bindings\Custom.3.0.binds
Traceback (most recent call last):
  File "D:\EDAutopilot\autopilot.py", line 1, in <module>
    from dev_tray import tray
  File "D:\EDAutopilot\dev_tray.py", line 3, in <module>
    from dev_autopilot import autopilot, resource_path, get_bindings, clear_input, set_scanner, RELEASE
  File "D:\EDAutopilot\dev_autopilot.py", line 372, in <module>
    keys = get_bindings()
  File "D:\EDAutopilot\dev_autopilot.py", line 354, in get_bindings
    binding['key'] = SCANCODE[binding['pre_key']]
KeyError: 'DIK_LEFTBRACKET'

Welp, i've been trying for so long now, but i can't get past this single error.

@SumZer0-git
Copy link

I don't use the left bracket in my bindings and thus didn't run into this. You will have to add it to get_bindings() routine

    convert_to_direct_keys = {
        'Key_LeftShift':'LShift',
        'Key_RightShift':'RShift',
        'Key_LeftAlt':'LAlt',
        'Key_RightAlt':'RAlt',
        'Key_LeftControl':'LControl',
        'Key_RightControl':'RControl',
        'Key_LeftBracket':'LBracket',
        'Key_RightBracket':'RBracket'
    }

DIK_LBracket, so you are missing this special conversion, I added the right bracket too for completeness. I'm pretty sure this is it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants