-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add Raw Mode Support #175
Add Raw Mode Support #175
Conversation
Well, that was a lot of work. Mordant targets JVM/jna, JVM/nativeimage, KT/Native, JS, and wasmJS. Multiply that by three operating systems, and any time you touch a syscall you need to implement it a dozen times. |
what was the trouble around compiling with graal ? I remember having a beast of a time getting pico to compile to graal, but I eventually got it working. Is this something I could help with? |
I'd love help if you want to take a look. The problem is actually kind of silly, but I couldn't figure out how to represent the |
no guarantees I can actually figure anything out! bug I love the challenge! dont wait up on me, I'm not sure when I'll get to this, but I will get to it! |
Raw mode is supported on all targets except JS and wasm, although there are node/browser APIs to read similar events. I also couldn't get Graal nativeimage working, although that could be added in the future.
I used to wonder why Jline supports raw mode but all you can do with it is read raw bytes from stdin. But after wading into the mess of parsing VTI escape sequences, I can see why they tapped out. But I'm not willing to push that pain onto users, so I parse all the VTI sequences I can find into
InputEvent
data classes. You can still read raw bytes from stdin instead if you want.Fixes #173
Fixes #133
Fixes #89
Fixes #33