-
Notifications
You must be signed in to change notification settings - Fork 2
/
init_keys.c
67 lines (58 loc) · 1016 Bytes
/
init_keys.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
** init_keys.c for my_select in /home/sebastien/travaux/my_select
**
** Made by sebastien
** Login <[email protected]>
**
** Started on Thu Jan 16 18:26:03 2014 sebastien
** Last update Fri Jan 17 11:34:47 2014 sebastien
*/
#include <stdlib.h>
char *init_prec(void)
{
char *keycode;
if (keycode = (char*)malloc(4))
{
keycode[0] = 27;
keycode[1] = 91;
keycode[2] = 65;
keycode[3] = 0;
}
return (keycode);
}
char *init_next(void)
{
char *keycode;
if (keycode = (char*)malloc(4))
{
keycode[0] = 27;
keycode[1] = 91;
keycode[2] = 66;
keycode[3] = 0;
}
return (keycode);
}
char *init_left(void)
{
char *keycode;
if (keycode = (char*)malloc(4))
{
keycode[0] = 27;
keycode[1] = 91;
keycode[2] = 68;
keycode[3] = 0;
}
return (keycode);
}
char *init_right(void)
{
char *keycode;
if (keycode = (char*)malloc(4))
{
keycode[0] = 27;
keycode[1] = 91;
keycode[2] = 67;
keycode[3] = 0;
}
return (keycode);
}