Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cbreak(3cur) [ultrix man page]

cbreak(3cur)															      cbreak(3cur)

       cbreak, nocbreak - set/clear cbreak mode

       int cbreak()

       int nocbreak()

       The  routine  puts  the terminal into CBREAK mode.  In this mode, characters typed by the user are immediately available to the program and
       erase/kill character processing is not performed.  Interrupt and flow control characters are unaffected by this mode.

       The routine disables CBREAK.  In this case the terminal driver will buffer input until a newline or carriage return is typed.

       The initial settings that determine whether or not a terminal is in CBREAK mode are dependent on the terminal driver implementation.  As  a
       result  of this, it is not possible to determine if a terminal is in CBREAK mode, as it is an inherited characteristic.	It is necessary to
       call to ensure that the terminal is set to the correct mode for the application.

Return Values
       The and functions return OK on success and ERR on error.


Check Out this Related Man Page

getch(3cur)															       getch(3cur)

       getch, mvgetch, mvwgetch, wgetch - read character

       #include <cursesX.h>

       int getch()

       int wgetch(win)
       WINDOW *win;

       int mvgetch(y, x)
       int y, x;

       int mvwgetch(win, y, x)
       WINDOW *win;
       int y, x;

       The routine reads a character from the terminal associated with the default window.

       The routine reads a character from the terminal associated with the specified window.

       The routine reads a character from the terminal associated with the default window at the specified position.

       The routine reads a character from the terminal associated with the specified window at the specified position.

       The  following information applies to all the routines.	In mode, if there is no input waiting, the integer is returned.  In mode, the pro-
       gram waits until the system passes text through to the program.	Usually the program will restart after one character or  after	the  first
       newline, but this depends on how is set.  The character will be echoed on the designated window unless has been set.

       If is and a function key is pressed, the token for that function key is returned instead of the raw characters.	Possible function keys are
       defined in the header file with integers beginning with 0401.  The function key names begin with KEY_.  Function keys and their	respective
       integer values are described in the Guide to X/Open Curses Screen-Handling (R)

       If  a character is received that could be the beginning of a function key (such as escape), sets a timer.  If the remainder of the sequence
       does not come within the designated time, the character will be passed through, otherwise the  function	key  value  is	returned.   Conse-
       quently, there may be a delay after a user presses the escape key before the escape is returned to the program.

       Using the escape key for a single character function is discouraged.

       The routines and are macros.

Return Values
       Upon successful completion, the and functions return the character read.

       If in delay mode and no data is available, ERR is returned.

See Also
       cbreak(3cur), keypad(3cur), nodelay(3cur), noecho(3cur)
       Guide to X/Open Curses Screen-Handling

Man Page

8 More Discussions You Might Find Interesting

1. Programming

Curses not updating LINES/COLS

I'm working with an extremely outdated and old system at work. We do not have ncurses, but we do have curses. I need to make a user interface for users connecting with xterm. One issue I've encountered is if the user resizes the window, I'd like to provide functionality to redraw the screen with... (4 Replies)
Discussion started by: nwboy74
4 Replies

2. Shell Programming and Scripting

Bash KeyPress (or Read Single Character)

Hi, I'm sorry if this has already been posted somewhere but I can't seem to find it on the forums (or anywhere on google :( ) I am writing a script where a user must enter a single character to perform an action. For example, Press Q to Quit or R to Refresh Basically I am stuggling... (5 Replies)
Discussion started by: Ste_Moore01
5 Replies

3. AIX

Read input data within a specified period of time

Hi All, I am working on a script which requires an input from user within one 1 min. So if the user gives the required input within 1 min., it will execute on the basis of input provided by the user.Other wise it will execute on a default value(hard coded inside the script). Now, I am... (19 Replies)
Discussion started by: rajsharma
19 Replies

4. Shell Programming and Scripting

silent Input in PERL

Hello Experts, I am learning perl. I know ksh/bash/csh... In ksh I use to do this way... to read user input in silent mode so that nothing returns on the screen. stty -echo read -r pswd stty echo Please let me know the way in perl how to do it. Here are my OS and Perl Details... ... (3 Replies)
Discussion started by: explorer007
3 Replies

5. UNIX for Dummies Questions & Answers

Need help with repeating variables in a shell script

I should preface this by saying I have never worked with shell scripts before so this is all new to me. I was able to make something that worked, but is terribly optimized, and I have no idea how to improve it. If anything it's a pretty hilarious script: #/bin/bash get_char() { ... (4 Replies)
Discussion started by: ricco19
4 Replies

6. Shell Programming and Scripting

Perl script stopped working

Hi, I have the following segment of a script which is supposed to prompt a user for password and then capture the password entered by the user. The function is called in by another script and used to work without issue, the problem is that recently the script is not waiting for the user to... (3 Replies)
Discussion started by: belalr
3 Replies

7. Shell Programming and Scripting

Execute function as soon as input is provided in menu drive shell script

Hi All, I have a menu driven scripts. As you know while running the script we have to input the option such as 1,2, and 3 to execute function accordingly. but after selecting the input we have to press Enter. My requirement is to execute function as soon as we press the option. Is there... (5 Replies)
Discussion started by: kiran_j
5 Replies

8. UNIX for Beginners Questions & Answers

Ncurses status bar

Hi, all, I'm writing a BBS telnet client, and am trying to implement a status bar into it, at the bottom of the screen. I am using NCurses to accomplish this. So far, it appears to be working, that is, upon connecting to BBS, it will display the status bar, and then quickly disappear. ... (5 Replies)
Discussion started by: ignatius
5 Replies