keys.c File Reference

Keycode mapping VNC -> Hifidelio. More...

#include <stdlib.h>
#include "keys.h"

Include dependency graph for keys.c:


Data Structures

struct  keys_vnc_hf_mapping
 Keycode mapping entry. More...

Functions

static int keys_compare_mapping (const void *a, const void *b)
int keys_translate_vnc_hf (rfbKeySym vnc_key, rfbKeySym *hf_key, rfbKeySym *hf_modifier)
int keys_is_xk_modifier (rfbKeySym xk_key)

Variables

static struct keys_vnc_hf_mapping key_mapping []
const int keys_mapping_size

Detailed Description

Translates X keyboard keycodes into Hifidelio keycodes with modifier.

Function Documentation

static int keys_compare_mapping ( const void *  a,
const void *  b 
) [static]

Comparison function for keycode mapping entries.

Parameters:
a mapping entry
b mapping entry
Returns:
negative if the first argument is less than the second, zero if they are equal, and positive if the first argument is greater

int keys_translate_vnc_hf ( rfbKeySym  vnc_key,
rfbKeySym *  hf_key,
rfbKeySym *  hf_modifier 
)

Translates VNC keycodes into Hifidelio keycodes.

Parameters:
vnc_key VNC keycode
hf_key Hifidelio keycode (return value)
hf_modifier Hifidelio key modifier code (return value)
Returns:
0 on success or -1 if an error occured

int keys_is_xk_modifier ( rfbKeySym  xk_key  ) 

Checks if a given XK keycode belongs to a key modifier.

Parameters:
xk_key XK keycode
Returns:
1 if key is a modifier key, else 0


Variable Documentation

struct keys_vnc_hf_mapping key_mapping[] [static]

Keycode mapping array.

const int keys_mapping_size

Initial value:

        sizeof(key_mapping)/sizeof(struct keys_vnc_hf_mapping)
Size of keycode mapping array.


Generated on Mon Mar 29 01:39:29 2010 for Veronica by  doxygen 1.5.8