FreeBASIC  0.91.0
io_multikey.c File Reference
#include "../fb.h"
#include "../unix/fb_private_console.h"
#include <sys/ioctl.h>
#include <signal.h>
#include <linux/kd.h>
#include <linux/keyboard.h>
#include <linux/vt.h>
#include "../fb_private_hdynload.h"
#include "../unix/fb_private_scancodes_x11.h"
Include dependency graph for io_multikey.c:

Go to the source code of this file.

Data Structures

struct  X_FUNCS
 

Macros

#define KEY_BUFFER_SIZE   16
 
#define NUM_PAD_KEYS   17
 

Functions

static int keyboard_init (void)
 
static void keyboard_exit (void)
 
static int keyboard_console_getch (void)
 
static void keyboard_console_handler (void)
 
static void keyboard_x11_handler (void)
 
int fb_ConsoleMultikey (int scancode)
 
int fb_hConsoleGfxMode (void(*gfx_exit)(void), void(*save)(void), void(*restore)(void), void(*key_handler)(int, int, int, int))
 

Variables

static Display * display
 
static FB_DYLIB xlib = NULL
 
static X_FUNCS X = { NULL }
 
static pid_t main_pid
 
static int key_fd
 
static int key_old_mode
 
static int key_leds
 
static unsigned char key_state [128]
 
static unsigned short key_buffer [KEY_BUFFER_SIZE]
 
static unsigned short key_head
 
static unsigned short key_tail
 
static int(* old_getch )(void)
 
static void(* gfx_save )(void)
 
static void(* gfx_restore )(void)
 
static void(* gfx_key_handler )(int, int, int, int)
 
static const char pad_numlock_ascii [NUM_PAD_KEYS] = "0123456789+-*/\r,."
 
static const char pad_ascii [NUM_PAD_KEYS] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '+', '-', '*', '/', '\r', 0, 0 }
 
static const unsigned char kernel_to_scancode []
 

Macro Definition Documentation

#define KEY_BUFFER_SIZE   16

Definition at line 11 of file io_multikey.c.

#define NUM_PAD_KEYS   17

Definition at line 12 of file io_multikey.c.

Function Documentation

int fb_ConsoleMultikey ( int  scancode)

Definition at line 310 of file io_multikey.c.

Here is the call graph for this function:

int fb_hConsoleGfxMode ( void(*)(void)  gfx_exit,
void(*)(void)  save,
void(*)(void)  restore,
void(*)(int, int, int, int)  key_handler 
)

Definition at line 336 of file io_multikey.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int keyboard_console_getch ( void  )
static

Definition at line 81 of file io_multikey.c.

Here is the caller graph for this function:

static void keyboard_console_handler ( void  )
static

Definition at line 97 of file io_multikey.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void keyboard_exit ( void  )
static

Definition at line 291 of file io_multikey.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int keyboard_init ( void  )
static

Definition at line 235 of file io_multikey.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void keyboard_x11_handler ( void  )
static

Definition at line 219 of file io_multikey.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Display* display
static

Definition at line 29 of file io_multikey.c.

void(* gfx_key_handler)(int, int, int, int)
static

Definition at line 41 of file io_multikey.c.

void(* gfx_restore)(void)
static

Definition at line 40 of file io_multikey.c.

void(* gfx_save)(void)
static

Definition at line 39 of file io_multikey.c.

const unsigned char kernel_to_scancode[]
static

Definition at line 46 of file io_multikey.c.

unsigned short key_buffer[KEY_BUFFER_SIZE]
static

Definition at line 37 of file io_multikey.c.

int key_fd
static

Definition at line 35 of file io_multikey.c.

unsigned short key_head
static

Definition at line 37 of file io_multikey.c.

int key_leds
static

Definition at line 35 of file io_multikey.c.

int key_old_mode
static

Definition at line 35 of file io_multikey.c.

unsigned char key_state[128]
static

Definition at line 36 of file io_multikey.c.

unsigned short key_tail
static

Definition at line 37 of file io_multikey.c.

pid_t main_pid
static

Definition at line 34 of file io_multikey.c.

int(* old_getch)(void)
static

Definition at line 38 of file io_multikey.c.

const char pad_ascii[NUM_PAD_KEYS] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '+', '-', '*', '/', '\r', 0, 0 }
static

Definition at line 44 of file io_multikey.c.

const char pad_numlock_ascii[NUM_PAD_KEYS] = "0123456789+-*/\r,."
static

Definition at line 43 of file io_multikey.c.

X_FUNCS X = { NULL }
static

Definition at line 31 of file io_multikey.c.

FB_DYLIB xlib = NULL
static

Definition at line 30 of file io_multikey.c.