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

Local Input Config for Keyboard #1067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Hazado
Copy link
Contributor

@Hazado Hazado commented Feb 9, 2022

Allows the keymap to become global and persist through character creations.
If no keymap is found it uses the vault keymap until you go into the keymap settings and change a single keybind.

@dpogue
Copy link
Member

dpogue commented Feb 19, 2022

Probably doesn't impact this PR, but there are some open questions about how to handle keymaps across platforms: #786

@Hoikas Hoikas added Enhancement Non-critical feature addition Python Issues stemming from the Python API files labels Feb 23, 2022
PtDebugPrint("xIniInput::ConstructFilenameAndPath(): Using internal \"" + gFilenameAndPath + "\" file")
return
# otherwise, use the standard init path
gFilenameAndPath = PtGetInitPath() + "/" + gFilename
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably return the path instead of stashing it as a global variable. That way, you can get rid of the gFilenameAndPath thing and just do gIniFile.writeFile(ConstructFilenameAndPath()).

controlStr = km.convertControlCodeToString(control_code)
key1 = km.convertVKeyToChar(km.getBindingKey1(control_code), km.getBindingFlags1(control_code))
key2 = km.convertVKeyToChar(km.getBindingKey2(control_code), km.getBindingFlags2(control_code))
xIniInput.SetControlKey('"' + controlStr + '"', key1 + ',', key2 + ',')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These string concats are very difficult for me to read because it uses two different kinds of quotation marks. I'd prefer to see these become f-strings.

@Hoikas Hoikas closed this in #1573 May 18, 2024
@Hoikas Hoikas reopened this May 19, 2024
@Hoikas
Copy link
Member

Hoikas commented May 19, 2024

Erroneously auto-closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Non-critical feature addition Python Issues stemming from the Python API files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants