-
Notifications
You must be signed in to change notification settings - Fork 81
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
base: master
Are you sure you want to change the base?
Conversation
Probably doesn't impact this PR, but there are some open questions about how to handle keymaps across platforms: #786 |
PtDebugPrint("xIniInput::ConstructFilenameAndPath(): Using internal \"" + gFilenameAndPath + "\" file") | ||
return | ||
# otherwise, use the standard init path | ||
gFilenameAndPath = PtGetInitPath() + "/" + gFilename |
There was a problem hiding this comment.
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 + ',') |
There was a problem hiding this comment.
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.
Erroneously auto-closed |
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.