Skip to content

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.

@LorenDB LorenDB requested a review from deepbluev7 September 26, 2023 20:46
@LorenDB LorenDB mentioned this pull request Sep 30, 2023
1 task
@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.

3 participants