Solved

line editing in noncanonical input mode

Posted on 1997-02-12
1
322 Views
Last Modified: 2008-03-10
How do I enable the backspace key when I am in noncanonical input mode (i.e. I used ~ICANON in tcsetattr)?
0
Comment
Question by:joles
1 Comment
 

Accepted Solution

by:
ansgar earned 100 total points
Comment Utility
You cannot! The special characters have only a meaning in canonical mode. (Ref David A. Curry in 'UNIX Systems Programming, 1st Ed, O'Reilly and Associates, p. 324-329).

You can, however, detect a backspace in your input (number 8),  
and use it to write a blank to stdout. I can send you a program
with a complete line editing algorithm in non-canonical mode, which I wrote as a subroutine - if you want me to.

 
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now