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

Begin work on adding editable shortcuts #1568

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

LorenDB
Copy link
Member

@LorenDB LorenDB commented Sep 25, 2023

This will eventually allow users to assign arbitrary shortcuts to actions to give them the ability to have shortcuts for everything(tm). Currently it is lacking some things like an editor though.

This will eventually allow users to assign arbitrary shortcuts to
actions to give them the ability to have shortcuts for everything(tm).
@LorenDB LorenDB marked this pull request as ready for review September 26, 2023 20:44
@LorenDB
Copy link
Member Author

LorenDB commented Sep 26, 2023

I'm not 100% sure that I've implemented this in the best possible way; I have to wonder if it wouldn't be better to reimplement this to have shortcuts registered during nheko startup instead of adding them on the fly as they are instantiated from QML. I'd be happy to hear feedback on that.

@duarm
Copy link
Contributor

duarm commented Oct 12, 2023

Would we be able to assign single-key hotkeys like 'i' to focus on the input field? This could be achieved by resolving the shortcuts inside Keys.onPressed on TimelineView, perhaps something like

   Keys.onPressed: event => {
        if (belongs_to_keybind(event.key)){
            begin_shortcut(event.key);
        } else if (!topBar.searchHasFocus) {
            TimelineManager.focusMessageInput();
            room.input.setText(room.input.text + event.text);
        }
   }

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

Successfully merging this pull request may close these issues.

2 participants