Git Product home page Git Product logo

Comments (6)

doums avatar doums commented on September 27, 2024 1

Hi, I think when you parse the config file you should be able to check for any key conflicts programmatically between user custom keys override and the TUI framework keys? And so notify the user on app startup?

I'm not a go dev, so I dont know the TUI framework you used to build this tool. But for a TUI framework, allowing the user to define its own keybindings for program actions is generally a first class feature.

My current solution for this is like customize theme. User can modify the yaml file, like translation key mapping to A-j if you are not in macOS. But user must be aware of any conflict with TUI framework or your system. How do you think?

Yes that the way to go, inside the config file, having a keys section where the user can map "key to action" as he sees fit.
And adding a section in the readme key mapping is a must have.

(Im not a mac user, but if there are constrains with mac well just add it in the doc to let users know, but dont block the feature because on mac "it's more complicated").

from gtt.

eeeXun avatar eeeXun commented on September 27, 2024

There are many keys that conflicts with the TUI framework. Like C-a begin of line, C-e end of line, etc. And alt is not work on macOS mention in #1 (comment).

My current solution for this is like customize theme. User can modify the yaml file, like translation key mapping to A-j if you are not in macOS. But user must be aware of any conflict with TUI framework or your system. How do you think?

from gtt.

eeeXun avatar eeeXun commented on September 27, 2024

Thanks for your feedback. I'll manage to do that.

from gtt.

doums avatar doums commented on September 27, 2024

Okay cool! Thx again for your work, it's already an amazing tool.

from gtt.

eeeXun avatar eeeXun commented on September 27, 2024

I've implemented in #22, you could checkout custom-key branch.

This is the config file

For key to combine with Ctrl, value can be " " (Space), "\\" or '\' (backslash), "]", "^", "_", "a" to "z" (lower case).

Or the function key, value can be "F1" to "F64"

⚠️ Note, don't use "c", <C-c> is for exit program

From the above, is there any part that may mislead the user?

If it is ok, I'm going to merge it

from gtt.

eeeXun avatar eeeXun commented on September 27, 2024

Done in #22

from gtt.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.