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

Unable to map numeric shortcut to a another key #527

Open
vortexnix opened this issue Oct 9, 2023 · 9 comments
Open

Unable to map numeric shortcut to a another key #527

vortexnix opened this issue Oct 9, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@vortexnix
Copy link

Describe the bug
In my configuration, shortcut 1 is mapped to a custom script:
uda.taskwarrior-tui.shortcuts.1=/path/to/custom_script.py
This works. However, I am unable to remap the shortcut key 1 to bor any other key. This does not work:
uda.taskwarrior-tui.keyconfig.shortcut1=b

Environment

  • Operating System:
LSB Version:    core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
  • Installation:
    Binary from github
    taskwarrior-tui-x86_64-unknown-linux-musl.tar.gz
    taskwarrior-tui 0.25.4
    task 2.6.1

I am sure I am missing something basic here. Kindly help.

@vortexnix vortexnix added the bug Something isn't working label Oct 9, 2023
@fullstopslash
Copy link

I've started experiencing this as well.

@kdheepak
Copy link
Owner

This could potentially be related to this issue:

#517

I’ll have to look into it over the weekend. Can you use the previous version until then?

@vortexnix
Copy link
Author

Sure. No rush. Thanks for looking into it.

@matt-snider
Copy link

I just ran into this too.

@kdheepak It looks to me like those values simply are not loaded from the config.

i.e. something like

    let shortcut0 = Self::get_config("uda.taskwarrior-tui.keyconfig.shortcut0", data);
    // ...
    self.shortcut0 = shortcut0.unwrap_or(self.shortcut0);

@kdheepak
Copy link
Owner

You are right! Wow, I could have sworn I had implemented that.

Interested in making a PR? If not, I can fix it the next time I'm at my personal computer.

@kdheepak
Copy link
Owner

kdheepak commented Dec 10, 2023

I misunderstood the ask here. Sorry for the confusion. This was never implemented to begin with, an artifact of the fact that key configuration was adding after shortcuts were introduced.

Currently it is only possible to have shortcuts bound to 1-9 keys. I'll enable different key shortcuts as part of the refactor/rewrite. Here's the tracking issue: #349

@matt-snider
Copy link

@kdheepak Ahh ok I see! Thanks for the update.

But wouldn't it be as simple as adding the additional lines for the shortcut 0-9 in the area I linked above? Just wondering because if that is a quick fix that could be made before the refactoring/rewrite, then it would at least get the shortcuts as documented a bit sooner

@kdheepak
Copy link
Owner

I don't think it is just those additional lines, but similar lines will work.

Currently, shortcuts are mapped like this:

uda.taskwarrior-tui.shortcuts.1=~/.config/taskwarrior-tui/shortcut-scripts/add-personal-tag.sh

As brought up in #520, I think using the .taskrc file for this is a little unwieldy and probably better off with a dedicated configuration file.

@katekorsaro
Copy link
Contributor

katekorsaro commented Jan 15, 2024

I've just submitted a PR about this (#532)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants