Closed nanoandrew4 closed 7 years ago
Currently the command line does not interpret arrow keys at all. I just pushed some experimental code that works in Linux, but might not in Windows, if anyone can give it a spin and check that it outputs "up", "left", "right" and "down" for the respective keys, that would be greatly appreciated.
Commit with experimental code: 6c3cba17161cc4de5d30846f601c5c1b5755bbee
Ah, I didn't even consider command scrolling. Good thinking!
But as of now, my input isn't reading any characters at the input prompt at all...
It's not supposed to, it's test code. See if the arrow keys on your keyboard work, all other input is blocked.
On Oct 5, 2017 18:17, "Sergix" notifications@github.com wrote:
Ah, I didn't even consider command scrolling. Good thinking!
But as of now, my input isn't reading any characters at the input prompt at all...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sergix/JTerm/issues/47#issuecomment-334594725, or mute the thread https://github.com/notifications/unsubscribe-auth/ANsyiMhgCA_XRMH1ZwDR-38oNaCQhDhiks5spUdOgaJpZM4PvUev .
Ohohoh. My bad. :rofl:
But no, I don't believe it works on my machine. When I press the arrow keys nothing happens. The expected output is to print the arrow key being pressed, correct?
Yes that should be the output. I will check to see what Windows is interpreting it as...
Edit: Pull request is still open... Is there an issue you have run into with the code?
The PR is still open because your current commits with the arrow key testing are being included in that PR.
Do you want me to remove that push so it can be merged or just take down the request and make a new one when this is implemented?
No, I'll just wait for the issue to be completed.
@Sergix I checked the pull request and it does not include the experimental code, all three commits that form part of the pull request are all working code that has been tested. I re-opened it for it to be merged, if everything is still fine as it was when issue #32 was closed.
In the current PR, it still shows that InputHandler.java
has the test code: https://github.com/Sergix/JTerm/pull/46/files#diff-43ec57f4d6646bf342fb6beef3f03da9
Hi,
I have modified InputHandler and JTerm for command rotation. Would someone like to take a look? This is my first attempt at open source working. So all guidance in reviewing the code and help me check-in will be appreciated. thanks.
@nagharajan I would gladly take a look at the code! I looked at your GitHub page and there is no fork... Where can the code be found?
This issue is still in progress, correct?
Should be fixed with my latest commit but... Last I checked everything was broken, do the arrow keys even work?
I have it all working and pretty in my other project, would you like me to adapt the input handling code over?
If you can, sure! :)
By the way, I took a look at your other project. It looks really great! :D
Thanks 😇 doesn't do much yet, trying to iron out all those pesky bugs that plague the input and autocomplete. I'll close my PR and open a new one when the code is merged, probably tomorrow or Monday when I finish ironing out the autocomplete which is failing for some odd reason...
Just finished cleaning up the code and testing, all is good on Unix at least.
I will start transplanting my code to this project, making sure to try not to upset any Windows code...
Sounds good! 👍
And it's interesting how we have to worry about platform-dependency on what's supposed to be a platform-independent executable. Too bad Java doesn't have more native libraries. 😜
The wonders of writing platform-dependent code... It is too bad Java does not do the heavy lifting on that end, but it is what you get for trying to make a terminal program xD. Of course, a lot of the platform dependence could be dropped if you just reverted back to line by line input. Oh what we do for you, autocomplete....
Haha! So very true. 🤣
PR #78 should close this issue.
Lets you rotate through previously entered commands, so that they can be reused.