-
Notifications
You must be signed in to change notification settings - Fork 39
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
Switch to tcell #45
Switch to tcell #45
Conversation
There are still some background color issues left but this has helped a fair bit to reduce it When loggint the char rendered to the screen it's background color sometimes the color is 0 instaid of the default tcell color (-1) and thus the background of the char is black instaid of the default color. In termbox the default color number is 0 and thus all struct values are left empty because there is no point to setting 0 but in this case that's a bit annoying because tcell's default color is diffrent
The char is not nil if the tcell.Key is defined
"os" | ||
) | ||
|
||
func l(v ...interface{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func l
is unused (from unused
)
Just a suggestion, https://github.com/MichaelMure/git-bug might be a good real world test as well, especially if you write some comment in wide character like with japanese or chinese. |
Why use |
@abitrolly see #42 for the main reason |
I am stronly against using a vendor folder in this project. I think using a vendor folder adds unneeded amounts of code to the library and defeats the whole purpose of using modules (for this library) Edit: this was based on an older version, i see you have removed it |
I can help you with the files if you want, just give me a file to change and ill work on it |
Thanks @glvr182 Something that i cant seem to fix is in the goroutine example where there are black boxes between the numbers, if you want to help with that that would be great. About the vendor folder.. |
We can hop on a call if needed so i can help you with the gomodules if you want. |
Thanks for trying to continue my work. |
Highly recommend Goland as an IDE for go. You can start with the 30 days trial and apply for a free open source license: https://www.jetbrains.com/community/opensource/ |
For students GoLand is free to use I think, so if you want to try that, deff give it a go! As for VSCode yea there are still some issues with Go. Usually restarting the language server works for me. |
Testing these now, will push results later.
|
@MichaelMure I have tried Goland multiple times because it's go integration is better but i dislike so much things about the editor that i just can't get use to it. I'm trying to use vim more but it's really hard changing the way i think about navigating and changing code after all those year using using the ms word way of navigating / editing code. |
Are there any frameworks for testing console programs? The output seems deterministic. Maybe a simple |
I have not found anything yet @abitrolly would be useful |
Could not find anything specific - an article about |
Hi. |
@Nojus297 , If you want to help you could checkout on this branch and try to fix one (or more) of the not working examples. You don't have to worry about me also making progress because i'm dealing with some personal issues that cause me to not enjoy programming lately, hopefully the joy will be back soon and i'll continue working on this. |
ok,
|
@Nojus297 thanks for looking into this,
Thanks so much for finding that, I've looked many hours but couldn't find it.
I'm not yet completely sure what we should do here, currently i think the best thing to do here is to hold the same gocui API.
What do you mean with that? |
Is it possible to avoid mixing keycodes with chars? It is necessary to make shortcuts work regardless of keyboard layout. I don't know if terminal allows that - catch keycode press event and then provide char as a property. https://github.com/yakshaveinc/go-keycodes - is an attempt to name keycodes as in cross-platform SDL library. This may unify binding definitions and make keyboard configs compatible between platforms and software. |
Basically, notably more flickering when resizing. |
@abitrolly what about combined key presses? I'm pretty sure gocui has something like |
@Nojus297 I found that SDL2 practices for shortcuts are checking which combinations are pressed using a big "if" in an event loop handler. An easier interface is to have a global Keyboard object that maintains the state automatically. |
After some looking around, it seems that terminals are very limited in sending keyboard input, but again, I'm not an expert. Different key presses might produce the same result, while not being able to capture other events. Having a standard keycode library doesn't really matter to me, as we have cross-platform and cross-terminal key events by tcell. |
What do you maintainers think? |
This exception need to be raised among terminal developers. Maybe it is time to rethink terminals. The same way https://mosh.org/ did for SSH. |
Hi, I tried to implement it in most compatible way I could think of. Colors are starting from 0. I used the original Mouse clicks should work more or less the same way. All the example programs are running for me and I added one more to test 24bit colors. However, I tested it only on remote Linux machine (accessed from Windows Terminal), where everything worked well (even the mouse). Windows 7 is a bit problem. Still looking into it if it's possible to fix. Didn't try it after I swap to If anybody could try it on other platforms or on the same platform and let me know if there are any problems, that could be helpful. If you would be interested in including it here, let me know and I can open PR. I didn't try to incorporate the changes right in |
Holyshit that's awesome. Since the creation of this PR (one year ago now) i've had a depression and ever since i lost interest in programming for this project though i still love the project and i would love for it to continue development. For testing your branch i'm running Linux and i can test it somewhere in the next few days if you want? |
Closing this in favor of @dankox his pr |
Still a lot of work to do to see if it's possible to replace termbox with tcell but were getting somewhere.
Known issues/todo:
KeyUp, KeyRight, etc
toKeyArrowUp, KeyArrowRight, etc
this will reduce the amount of work required for a end user when updating this library or migrate to this libraryExamples tested and fully working:
If this pr gets to a stage where it can do the same as the current master and we all agree on using this i also want to try to update a real project to see if this is actually production ready and see if there are any left over bugs.
Projects i would like to test this on:
The go mod and sum are renamed because go 1.13 has some wired issues.