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

New Input System #4

Open
2 of 7 tasks
ghost opened this issue Apr 13, 2018 · 1 comment
Open
2 of 7 tasks

New Input System #4

ghost opened this issue Apr 13, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 13, 2018

I have started work on a new input system (essentially a replacement for default io, readline, linenoise, etc.). This system allows me to do the following:

  • Store commands in history, show them using up and down arrows

  • Tabs displayed properly (using 4 spaces currently, will be user configurable) - This is the main reason why I wanted to create this new system

  • Hints? - As you are typing, Virtual/Ghost text will show up as auto-completion. use Ctrl-space to change to next auto-complete option

  • Portable - alternatives are either not portable with all major systems, or are written in C++

  • Custom Control Commands - i.e. Ctrl-Z and Ctrl-X for End of Input and Cancel

  • Syntax Highlighting during input?

  • Preset/Default text - useful for auto-indentation (because it'll still allow you to de-indent) and for general editing of a line

  • Lightweight? - The system might not need to be as advanced as some of the alternatives. This improves portability as there's less to provide for all systems.

  • Works directly with my data structure for storing lines - no need to transfer/copy stuff over, which in turn means less memory allocations

So far, the current system has only been tested on Windows. Therefore, the system is only enabled for Windows builds.

Current Problems:

  • When the terminal wraps the line, the backspace and left/right arrows won't work correctly - This issue only happens under Windows
@ghost
Copy link
Author

ghost commented Apr 15, 2018

This now works under Linux and has been enabled for Linux for all commands that take text input!

While this is enabled for Mac and BSD, it hasn't been tested for these systems yet.

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

0 participants