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

Strange caracters in the terminal #48

Closed
Brownie2002 opened this issue Apr 13, 2020 · 4 comments
Closed

Strange caracters in the terminal #48

Brownie2002 opened this issue Apr 13, 2020 · 4 comments

Comments

@Brownie2002
Copy link

Hello,

When I launch mcron in a linux terminal, the arrows to move inside the line are not recognised :

brownie@localhost:/tmp/mcrcon$ ./mcrcon -t
Logged in. Type 'quit' or 'exit' to quit.
>help
--------- Help: Index (1/11) --------------------
Use /help [n] to get page n of help.
Aliases: Lists command aliases
Bukkit: All commands for Bukkit
dynmap: All commands for dynmap
Minecraft: All commands for Minecraft
WorldBorder: All commands for WorldBorder
/advancement: A Mojang provided command.
/ban: A Mojang provided command.
/ban-ip: A Mojang provided command.
>ban @test^[[D^[[D

The @test^[[D^[[D are arrows keystrokes to the left, after writing test

I don't know if the issue is related to the terminal or the software.

Regards,

Brownie

@IPlayZed
Copy link

This is pretty much normal, if those keystrokes are not handled by the programmer. For instance try the telnet command and do the same thing, it will yield the same results. Right now you can only use delete (backwards, or the Del button on your keyboard) to correct the input. (But correct me if I am wrong.) I hope this explained it a bit. :D

@Tiiffi
Copy link
Owner

Tiiffi commented May 31, 2020

@IPlayZed you are righ.

Catching arrow keys etc. on console requires a bit more involved and platform specific code and that is the reason I haven't implemented it.

My goal was to keep the source code relatively simple and concise. I also tried to avoid 3rd party library dependencies.

Proper console inputs with arrow key and tab support would require either TUI library like Curses or alternatively platform specific implementations for every relevant platform.

@sludin
Copy link

sludin commented Aug 17, 2020

FWIW I just added a pull request to incorporate readline for linux/osx (don't know enough WIN32 any more to even be dangerous). I think this takes care of this and issue #51 as well.

@Tiiffi
Copy link
Owner

Tiiffi commented Sep 1, 2020

Related to #51

@Tiiffi Tiiffi closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants