Solved

line editing in noncanonical input mode

Posted on 1997-02-12
1
332 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
ID: 1249576
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to setup iphone app subscription service 3 135
Estimate porting issues. 9 119
C++ check and remove last word from a string 5 170
chcp 65001 File encoding 66 246
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

770 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