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

feat: Shortcut manager #590

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

Conversation

VasigaranAndAngel
Copy link
Collaborator

@VasigaranAndAngel VasigaranAndAngel commented Nov 17, 2024

For customize key bindings.

this will be easily accessible once the settings window and key bindings in it are implemented. until then, we'll need to manually edit the config.ini file to set key bindings.

To test:
Add a new group and values as shown below to your config.ini file:

[Shortcuts]
open=Ctrl+1
save=Ctrl+2, Ctrl+3, Ctrl+4
new_tag="Ctrl+,", Ctrl+\"
deselect=
  • open=Ctrl+1: Sets the shortcut for "open" to Ctrl+1
  • save=Ctrl+2, Ctrl+3, Ctrl+4: You can add multiple shortcuts by separating with ,. All of these shortcuts will trigger the action.
  • new_tag="Ctrl+,", Ctrl+\": Use " to specify , as a key. use \ before " to specify " as a key (QSettings supported format)
  • deselect=: An empty value means no shortcut keys will trigger the action.

When saving shortcuts, the entry is removed from settings.ini if the shortcut matches the default shortcut for the action. is this behavior expected or should i change it?

test_shortcuts_manager.py: bug fix

improvements

improvements
@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed labels Nov 17, 2024
@Computerdores
Copy link
Collaborator

Hmm, this doesn't work for me on Windows 10.

Also I noticed that the Shortcuts Group gets removed from the config after starting and doesn't get readded on closing

@CyanVoxel
Copy link
Member

Could this be updated now that #622 is merged to make is easier to review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience
Projects
Status: 🏓 Ready for Review
Development

Successfully merging this pull request may close these issues.

3 participants