ynqa / promkit

A toolkit for building interactive prompt in Rust
https://crates.io/crates/promkit
MIT License
267 stars 7 forks source link

Use stty interrupt setting instead of hardcoding Ctrl+C #31

Open crabdancing opened 1 month ago

crabdancing commented 1 month ago

I have the following stty config:

speed 38400 baud; line = 0;
intr = ^Q; susp = ^W;
-brkint -imaxbel

The key issue here is that interrupt is set to Ctrl+Q. Raw terminal apps will (hopefully) pick up on this and interrupt on Ctrl+Q instead of Ctrl+C. promkit does not do this however. Instead, it ONLY responds to Ctrl+C.