📄 kbde_ascii.3
字号:
.\" Copyright 1998-2004 Valery Reznic (valery_reznic@users.sourceforge.net).\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date. The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein. The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".TH "KBDE ASCII" 3 "January 4, 2004" "Valery Reznic" "KBDE Programmer's manual".SH NAMEkbde_ascii_press, .brkbde_ascii_release, .brkbde_ascii_press_release.br\- Programming interface to keyboard emulator. Functions for ascii keys..SH SYNOPSIS.nf.B #include <kbde/kbde.h>.sp.B int kbde_ascii_key_press(int ascii, char *buffer);.sp.B int kbde_ascii_key_release(int ascii, char *buffer);.sp.B int kbde_ascii_key_press_release(int ascii, char *buffer);.sp.fi.SH DESCRIPTION.BR kbde_ascii_pressfill the \fBbuffer\fP with NULL-terminated string of scancodescorresponding to the key \fBascii\fP be pressed..PP.BR kbde_ascii_releasefill \fBbuffer\fP with scancodes corresponding to the key \fBascii\fP release..PP.BR kbde_ascii_press_releasefill \fBbuffer\fP with scancodes corresponding to the key \fBascii\fP press and release..PP.SH RETURN VALUEAll these function return -1 if \fBascii\fP is outside the range \fB0..127\fP. In this case \fBbuffer\fP untouched.Otherwise return value is length of NULL-terminated string putted to the \fBbuffer\fP..SH NOTE 1Ascii codes as described by \fBascii(7)\fP and key_codesas described by \fBxt_kbde_scancode(7)\fP and \fB<kbde/kbde.h>\fP are different..SH NOTE 2kbde_* and kbde_ascii_* functions are different in two ways. First, \fBkbde_*\fPfunctions got parameter \fBkey_code\fP, and \fBkbde_ascii_*\fP - parameter\fBascii\fP. Second, and more important, kbde_* functions is a generic wayto 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).SH EXAMPLE 1.One can use.nf.sp\fBkbde_ascii_press('\\t', buffer)\fPor\fBkbde_press(KBDE_KEY_Tab, buffer)\fPto got same result..fi.PP.SH EXAMPLE 2..nf.sp\fBkbde_ascii_press_release(3, buffer);\fP /* 3 == ^C */and\fBint 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 */\fPfill buffer with same context..fi.SH "SEE ALSO".BR ascii "(7),".br.BR xt_kbde_scancode "(7),".br.BR kbde_key_press "(3),".br.BR kbde_key_release "(3),".br.BR kbde_key_press_release "(3),".br.BR kbde_key_to_name "(3), ".br.BR kbde_name_to_key "(3), ".br.BR kbde_case_name_to_key "(3)".SH AUTHOR.LPValery Reznic <valery_reznic@users.sourceforge.net>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -