KBDE About Main Page
Get It
Driver
Utils
Develop
Resources
My Other SF projects |
Man Page kbde_ascii.3
KBDE ASCIISection: KBDE Programmer's manual (3)Updated: January 4, 2004 Index Return to Main Contents NAMEkbde_ascii_press,kbde_ascii_release, kbde_ascii_press_release - Programming interface to keyboard emulator. Functions for ascii keys. SYNOPSIS#include <kbde/kbde.h> int kbde_ascii_key_press(int ascii, char *buffer); int kbde_ascii_key_release(int ascii, char *buffer); int kbde_ascii_key_press_release(int ascii, char *buffer); DESCRIPTIONkbde_ascii_press fill the buffer with NULL-terminated string of scancodes corresponding to the key ascii be pressed.kbde_ascii_release fill buffer with scancodes corresponding to the key ascii release. kbde_ascii_press_release fill buffer with scancodes corresponding to the key ascii press and release. RETURN VALUEAll these function return -1 if ascii is outside the range 0..127. In this case buffer untouched. Otherwise return value is length of NULL-terminated string putted to the buffer.NOTE 1Ascii codes as described by ascii(7) and key_codes as described by xt_kbde_scancode(7) and <kbde/kbde.h> are different.NOTE 2kbde_* and kbde_ascii_* functions are different in two ways. First, kbde_* functions got parameter key_code, and kbde_ascii_* - parameter ascii. Second, and more important, kbde_* functions is a generic way to emulate any key press/release. kbde_ascii_* functions are convinience for emulate "ascii key" pressing. (But only way for Ctrl, Alt, F1-F12, etc keys is kbde_* functions)EXAMPLE 1.One can usekbde_ascii_press('\t', buffer) or kbde_press(KBDE_KEY_Tab, buffer) to got same result. EXAMPLE 2.kbde_ascii_press_release(3, buffer); /* 3 == ^C */ and int count = 0; count += kbde_key_press (KBDE_KEY_LCtrl, buffer + count); /* Ctrl press */ count += kbde_key_press (KBDE_KEY_C , buffer + count); /* C press */ count += kbde_key_release(KBDE_KEY_C , buffer + count); /* C release */ count += kbde_key_release(KBDE_KEY_LCtrl, buffer + count); /* Ctrl release */ fill buffer with same context. SEE ALSOascii(7),xt_kbde_scancode(7), kbde_key_press(3), kbde_key_release(3), kbde_key_press_release(3), kbde_key_to_name(3), kbde_name_to_key(3), kbde_case_name_to_key(3) AUTHORValery Reznic <valery_reznic@users.sourceforge.net>.
IndexThis document was created by man2html, using the manual pages. Time: 06:31:49 GMT, May 14, 2007 |