1keyboard_init(3) Svgalib User Manual keyboard_init(3)
2
3
4
6 keyboard_init, keyboard_init_return_fd - initialize the keyboard to raw
7 mode
8
10 #include <vgakeyboard.h>
11
12 int keyboard_init(void);
13 int keyboard_init_return_fd(void);
14
15
17 These routines initialize the keyboard to raw mode. No ASCII codes are
18 produced, instead svgalib keeps track of each single keypress or
19 depress. The return_fd version returns the file descriptor of the con‐
20 sole device to allow you to do further tricks with it (though it is
21 unclear which). The other version just returns 0 if successful. Both
22 return -1 on error.
23
24 keyboard_close(3) returns to normal operation.
25
26 When in raw keyboard mode you can no longer use vga_getch(3) or
27 vga_getkey(3) but you must use keyboard_getstate(3) or keyboard_key‐
28 pressed(3).
29
30 Depending on the setting of keyboard_translatekeys(3) even in raw mode
31 a <Ctrl>-C will cause a SIGINT. In any case svgalib will check for
32 <Alt>-F1 - <Alt>-F10 and perform console switches accordingly.
33
34
36 svgalib(7), vgagl(7), libvga.config(5), keytest(6), eventtest(6), key‐
37 board_seteventhandler(3), keyboard_close(3), keyboard_update(3), key‐
38 board_waitforupdate(3), keyboard_setdefaulteventhandler(3), key‐
39 board_getstate(3), keyboard_clearstate(3), keyboard_translatekeys(3),
40 keyboard_keypressed(3), vga_waitevent(3)
41
42
44 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
45 essen.de>. The exact source of the referenced function as well as of
46 the original documentation is unknown.
47
48 It is very likely that both are at least to some extent are due to Harm
49 Hanemaayer <H.Hanemaayer@inter.nl.net>.
50
51 Occasionally this might be wrong. I hereby asked to be excused by the
52 original author and will happily accept any additions or corrections to
53 this first version of the svgalib manual.
54
55
56
57Svgalib (>= 1.2.11) 27 July 1997 keyboard_init(3)