1keyname(3XCURSES)       X/Open Curses Library Functions      keyname(3XCURSES)
2
3
4

NAME

6       keyname, key_name - return character string used as key name
7

SYNOPSIS

9       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
10        -R  /usr/xpg4/lib  -lcurses  [ library... ]
11
12       c89 [ flag... ] file... -lcurses [ library... ]
13
14       #include <curses.h>
15
16       char *keyname(int c);
17
18
19       char *key_name(wchar_t wc);
20
21

PARAMETERS

23       c     Is an 8 bit-character or a key code.
24
25
26       wc    Is a wide character key name.
27
28

DESCRIPTION

30       The keyname() function returns a string pointer to the key name.   Make
31       a duplicate copy of the returned string if you plan to modify it.
32
33
34       The key_name() function is similar except that it accepts a wide  char‐
35       acter key name.
36
37
38       The  following  table  shows  the  format  of the key name based on the
39       input.
40
41
42
43
44       ┌──────────────────────────────────────────────────────────────────────┐
45Input                             Format of Key Name                  
46       │Visible character                 The same character                  │
47       │Control character                 ^X                                  │
48       │Meta-character (keyname() only)   M-X                                 │
49       │Key value defined in <curses.h>   KEY_name                            │
50       │(keyname() only)                                                      │
51       │None of the above                 UNKNOWN KEY                         
52       └──────────────────────────────────────────────────────────────────────┘
53
54
55       In  the  preceding  table, X can be either a visible character with the
56       high bit cleared or a control character.
57

RETURN VALUES

59       On success, these functions return a pointer to the string used as  the
60       key's name. Otherwise, they return a null pointer.
61

ERRORS

63       None.
64

ATTRIBUTES

66       See attributes(5) for descriptions of the following attributes:
67
68
69
70
71       ┌─────────────────────────────┬─────────────────────────────┐
72       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │Interface Stability          │Standard                     │
75       ├─────────────────────────────┼─────────────────────────────┤
76       │MT-Level                     │Unsafe                       │
77       └─────────────────────────────┴─────────────────────────────┘
78

SEE ALSO

80       libcurses(3XCURSES), meta(3XCURSES), attributes(5), standards(5)
81
82
83
84SunOS 5.11                        5 Jun 2002                 keyname(3XCURSES)
Impressum