Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

define_key(3x) [osx man page]

define_key(3X)															    define_key(3X)

NAME
define_key - define a keycode SYNOPSIS
#include <curses.h> int define_key(const char *definition, int keycode); DESCRIPTION
This is an extension to the curses library. It permits an application to define keycodes with their corresponding control strings, so that the ncurses library will interpret them just as it would the predefined codes in the terminfo database. If the given string is null, any existing definition for the keycode is removed. Similarly, if the given keycode is negative or zero, any existing string for the given definition is removed. RETURN VALUE
The keycode must be greater than zero, else ERR is returned. PORTABILITY
These routines are specific to ncurses. They were not supported on Version 7, BSD or System V implementations. It is recommended that any code depending on them be conditioned using NCURSES_VERSION. SEE ALSO
keyok(3X), key_defined(3X). AUTHOR
Thomas Dickey. define_key(3X)

Check Out this Related Man Page

define_key(3NCURSES)													      define_key(3NCURSES)

NAME
define_key - define a keycode SYNOPSIS
#include <curses.h> int define_key(const char *definition, int keycode); DESCRIPTION
This is an extension to the curses library. It permits an application to define keycodes with their corresponding control strings, so that the ncurses library will interpret them just as it would the predefined codes in the terminfo database. If the given string is null, any existing definition for the keycode is removed. Similarly, if the given keycode is negative or zero, any existing string for the given definition is removed. RETURN VALUE
The keycode must be greater than zero, and the string non-null, otherwise ERR is returned. ERR may also be returned if there is insuffi- cient memory to allocate the data to store the definition. If no error is detected, OK is returned. PORTABILITY
These routines are specific to ncurses. They were not supported on Version 7, BSD or System V implementations. It is recommended that any code depending on them be conditioned using NCURSES_VERSION. SEE ALSO
keyok(3NCURSES), key_defined(3NCURSES). AUTHOR
Thomas Dickey. define_key(3NCURSES)
Man Page

9 More Discussions You Might Find Interesting

1. Programming

help with shared memory

what i want to do is have an int that can been written into by 2 processes but my code doesn't seem to work. #include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> #include <sys/shm.h> #include<stdio.h> #define KEY1 (1492) int main() { int shmid; volatile int * addr;... (6 Replies)
Discussion started by: ddx08
6 Replies

2. Programming

inb(); not reading charaters as expected

I am sorry if this is in any way against the rules; the code isn't intended to be malicious, though it could be. If it is that bad, please delete/lock the thread instead of banning me. So, I'm creating a keylogger, and it's not working as expected. Currently the program reads directly into the... (13 Replies)
Discussion started by: Octal
13 Replies

3. Programming

[C]Problem removing a message queue

Hi!! This code works if I don't remove the message queue. In A.c I create 3 processes that send a message in a message queue. in B.c other 3 processes receive 1 message for each (the messages sent from A), change the value of "dato" and put again the message in the queue. The processes in A.c... (0 Replies)
Discussion started by: Sentinella
0 Replies

4. UNIX for Dummies Questions & Answers

IPC Message Queue. msgrcv doesnt work..

Hi everybody, this is the situation. there is a programm XYZ which opens a message queue with the key 47110815 and waits for a SIGUSR1. After receiving this signal it sends a message with type 100 and a number (as ASCII) in the message-body. I have to write a prog which frist sends the... (1 Reply)
Discussion started by: daredevil82m
1 Replies

5. Programming

Loading Data in shared memory (C++)

I'll try to keep this short, but basically I need to figure out a way to load data in shared memory (this file will be called load.c) I will later access the data with a print.c program. The "data" is in the form of a student database that looks like this John Blakeman 111223333 560... (7 Replies)
Discussion started by: Mercfh
7 Replies

6. Programming

Segmentation fault when debugging in C

Dear all, Currently I am implementing ECC protocols. I used tinyECC package to port ecc to contiki os. This giving me a segmentation fault. I followed some article Debugging Segmentation Faults and Pointer Problems - Cprogramming.com but I failed to detect the error. Please help me to find... (11 Replies)
Discussion started by: chap
11 Replies

7. UNIX for Dummies Questions & Answers

Printing a file within a cat call

Hello, I have a file called geom.txt which has some data in a particular format readable by another program (after adding some 'standard lines'), so what I want to do is to have a script that enables me to create a file (lets call it 'inpfile') readable for that program using a cat command, if I... (12 Replies)
Discussion started by: jaldo0805
12 Replies

8. Shell Programming and Scripting

Help with regular command creation for editor vi

Hi, I need help. I need to build command for line command editor vi. I want to take the whole string and assemble it in a regular expression. He then folded into another shape. Can anyone help me? (4 Replies)
Discussion started by: Pabloss
4 Replies

9. UNIX for Beginners Questions & Answers

Problem with a record

hi, i have a problem with linux redhat . I have a sequencial files and i want to delete a duplicate records . How i can to do. Thanks lot Regards (5 Replies)
Discussion started by: Francesco_IT
5 Replies