Comments (6)
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.
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.
Thanks for your feedback. I'll manage to do that.
from gtt.
Okay cool! Thx again for your work, it's already an amazing tool.
from gtt.
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.
Done in #22
from gtt.
Related Issues (11)
- Not working on fedora 38 HOT 2
- [Feat] Ability to specify left and right language on startup HOT 9
- Feature request: Option for saves history of searched words HOT 5
- DeepLx Support HOT 3
- Added gtt to nixpkgs HOT 1
- Feature: Add optional file path for reading API key HOT 6
- Missing package alsa during install HOT 6
- Deepl: Can't read from API key, although it's added HOT 11
- No translation shown HOT 2
- Add more translator engine HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtt.