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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)