KBDE

About
 Main Page

Get It
 Via the Web
 Via Anonymous CVS

Driver
 README
 News
 ChangeLog
 Installation
 THANKS
 FAQ

 KBDE.4
 KBDE.9

Utils
 README
 News
 ChangeLog

 KBDE.1

Develop
 KBDE.3
 KBDE_ASCII.3
 KBDE_MISC.3
 XT_KBDE_SCANCODE.7

Resources
 WEB CVS
 XT Scancodes
 SourceForge Page
 Mailing List
 Forums
 LinuxLinks
 Related Projects

My Other SF projects
 ksm
 nfstimesync
 noexec
 pkgrebuild
 rpmrebuild (with Eric Gerbier)
 rrp_statify
 statifier

SourceForge.net Logo

 
Man Page kbde_ascii.3
Manpage of KBDE ASCII

KBDE ASCII

Section: KBDE Programmer's manual (3)
Updated: January 4, 2004
Index Return to Main Contents
 

NAME

kbde_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);

 

DESCRIPTION

kbde_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 VALUE

All 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 1

Ascii codes as described by ascii(7) and key_codes as described by xt_kbde_scancode(7) and <kbde/kbde.h> are different.  

NOTE 2

kbde_* 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 use

kbde_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 ALSO

ascii(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)  

AUTHOR

Valery Reznic <valery_reznic@users.sourceforge.net>.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
NOTE 1
NOTE 2
EXAMPLE 1.
EXAMPLE 2.
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 06:31:49 GMT, May 14, 2007