⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1075-1076.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Complete Command Reference:Special Files:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=04 //-->

<!-- PAGES=1063-1102 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="1073-1074.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1077-1078.html">Next</A></CENTER></P>







<A NAME="PAGENUM-1075"><P>Page 1075</P></A>





<TABLE>



<TR><TD>

KDGETLED

</TD><TD>

Get state of LEDs. argp points to a long

int. The lower three bits of *argp are set to the state of the LEDs, as follows:<BR>

<!-- CODE SNIP //-->

<PRE>

LED_CAP     0x04     caps lock LED

LEC_NUM     0x02     num lock LED

LED_SCR     0x01     scroll lock LED

</PRE>

<!-- END CODE SNIP //-->

</TD></TR><TR><TD>

KDSETLED

</TD><TD>

Set the LEDs. The LEDs are set to correspond to the lower three bits of

argp. However, if a higher order bit is set, the LEDs revert to normal, displaying the

state of the keyboard functions of caps lock, num lock, and scroll lock.<BR>

<BR>Before 1.1.54, the LEDs just reflected the state of the corresponding keyboard

flags, and KDGETLED/KDSETLED would also change the keyboard flags. Since 1.1.54 the

LEDs can be made to display arbitrary information, but by default they display

the keyboard flags. The following two ioctls are used to access the keyboard flags.

</TD></TR><TR><TD>

KDGKBLED

</TD><TD>

Get keyboard flags CapsLock,

NumLock, ScrollLock (not lights). argp points to a

char that is set to the flag state. The low order three bits (mask

0x7) get the current flag state, and the low order bits of the next nibble (mask

0x70) get the default flag state (since 1.1.54).

</TD></TR><TR><TD>

KDSKBLED

</TD><TD>

Set keyboard flags CapsLock,

NumLock, ScrollLock (not lights). argp has the

desired flag state. The low order three bits (mask

0x7) have the flag state, and the low order bits of the next nibble (mask

0x70) have the default flag state (since 1.1.54).

</TD></TR><TR><TD>

KDGKBTYPE

</TD><TD>

Get keyboard type. This returns the value

KB 101, defined as 0x02.

</TD></TR><TR><TD>

KDADDIO

</TD><TD>

Add I/O port as valid. Equivalent to

ioperm(arg,1,1).

</TD></TR><TR><TD>

KDDELIO

</TD><TD>

Delete I/O port as valid. Equivalent to

ioperm(arg,1,0).

</TD></TR><TR><TD>

KDENABIO

</TD><TD>

Enable I/O to video board. Equivalent to

ioperm(0x3b4, 0x3df-0x3b4+1, 1).

</TD></TR><TR><TD>

KDDISABIO

</TD><TD>

Disable I/O to video board. Equivalent to

ioperm(0x3b4, 0x3df-0x3b4+ 1, 0).

</TD></TR><TR><TD>

KDSETMODE

</TD><TD>

Set text/graphics mode. argp is one of these:

<!-- CODE SNIP //-->

<PRE>

     KD_TEXT     0x00

     KD_GRAPHICS     0x01

</PRE>

<!-- END CODE SNIP //-->

</TD></TR><TR><TD>

KDGETMODE

</TD><TD>

Get text/graphics mode. argp points to a long which is set to one of the above values.

KDMKTONE     Generate tone of specified length. The lower 16 bits of

argp specify the period in clock cycles, and the upper 16 bits give the duration in

msec. If the duration is zero, the sound is turned off. Control returns immediately. For example,

argp = (125&lt;&lt;16) + 0x637 would specify the beep normally associated with a

ctrl-G.

</TD></TR><TR><TD>

KIOCSOUND

</TD><TD>

Start or stop sound generation. The lower 16 bits of

argp specify the period in clock cycles (that is, argp = 1193180/frequency).

argp = 0 turns sound off. In either case, control returns immediately.

</TD></TR><TR><TD>

GIO_CMAP

</TD><TD>

Get the current default color map from kernel.

argp points to a 48-byte array. <BR>

(Since 1.3.3.)

</TD></TR><TR><TD>

PIO_CMAP

</TD><TD>

Change the default text-mode color map.

argp points to a 48-byte array that contains, in order, the red, green, and blue values for the 16 available screen colors:

0 is off, and 255 is full intensity. The default colors are, in order: black, dark red,

dark green, brown, dark blue, dark purple, dark cyan, light grey, dark grey, bright

red, bright green, yellow, bright blue, bright purple, bright cyan, and white.

(Since 1.3.3.)

</TD></TR><TR><TD>

GIO_FONT

</TD><TD>

Gets 256-character screen font in expanded form.

argp points to an 8192-byte array. Fails with error code

EINVAL if the currently loaded font is a 512-character font, or

if the console is not in text mode.

</TD></TR></TABLE>



<A NAME="PAGENUM-1076"><P>Page 1076</P></A>



<TABLE>



<TR><TD>

GIO_FONTX

</TD><TD>

Gets screen font and associated information.

argp points to a struct consolefontdesc (see

PIO_FONTX). On call, the charcount field should be set to the maximum

number of characters that would fit in the buffer pointed to by

chardata. On return, the charcount and charheight are filled with the respective data for the currently

loaded font, and the chardata array contains the font data if the initial value of

charcount indicated enough space was available; otherwise the buffer is untouched and

errno is set to ENOMEM. (Since 1.3.1.)

</TD></TR><TR><TD>

PIO_FONT

</TD><TD>

Sets 256-character screen font. Load font into the EGA/VGA character

generator. argp points to a 8192-byte map, with 32 bytes per character. Only first

N of them are used for an 8xN font (0 &lt; N &lt;=

32). This call also invalidates the Unicode mapping.

</TD></TR><TR><TD>

PIO_FONTX

</TD><TD>

Sets screen font and associated rendering information.

argp points to a

</TD></TR><TR><TD>

</TD><TD>

<!-- CODE //-->

<PRE>

struct consolefontdesc {

u_short charcount; /* characters in font



                      (256 or 512) */

u_short charheight; /* scan lines per



                       character (1-32) */

char *chardata; /* font data in



                   expanded form */

};

</PRE>

<!-- END CODE //-->

</TD></TR><TR><TD>

</TD><TD>

If necessary, the screen will be appropriately

resized, and SIGWINCH sent to the appropriate processes. This call also invalidates the Unicode mapping. (Since 1.3.1.)

</TD></TR><TR><TD>

PIO_FONTRESET

</TD><TD>

Resets the screen font, size, and Unicode mapping to the bootup defaults.

argp is unused, but should be set to NULL to ensure compatibility with future versions

of Linux. (Since 1.3.28.)

</TD></TR><TR><TD>

GIO_SCRNMAP

</TD><TD>

Get screen mapping from kernel.

argp points to an area of size E_TABSZ, which is loaded with the font positions used to display each character. This call is likely

to return useless information if the currently loaded font is more than 256 characters.

</TD></TR><TR><TD>

GIO_UNISCRNMAP

</TD><TD>

Get full Unicode screen mapping from kernel.

argp points to an area of size E_TABSZ*sizeof (unsigned short), which is loaded with the Unicodes each

character represent. A special set of Unicodes, starting at

U+F000, are used to represent &quot;direct to font&quot; mappings. (Since 1.3.1.)

</TD></TR><TR><TD>

PIO_SCRNMAP

</TD><TD>

Loads the user-definable (fourth) table in the kernel that maps bytes into

console screen symbols. argp points to an area of size

E_TABSZ.

</TD></TR><TR><TD>

PIO_UNISCRNMAP

</TD><TD>

Loads the user-definable (fourth) table in the kernel that maps bytes into

Unicodes, which are then translated into screen symbols according to the currently

loaded Unicode-to-font map. Special Unicodes starting at

U+F000 can be used to map directly to the font symbols. (Since 1.3.1.)

</TD></TR><TR><TD>

GIO_UNIMAP

</TD><TD>

Get Unicode-to-font mapping from kernel.

argp points to a<BR>

<!-- CODE //-->

<PRE>

struct unimapdesc {

u_short entry_ct;

struct unipair *entries;

};

where entries points to an array of

struct unipair {

u_short unicode;

u_short fontpos;

};

(Since 1.1.92.)

</PRE>

<!-- END CODE //-->

</TD></TR><TR><TD>

PIO_UNIMAP

</TD><TD>

Put Unicode-to-font mapping in kernel.

argp points to a struct unimapdesc.

Since 1.1.92.)

</TD></TR></TABLE>







<P><CENTER>

<a href="1073-1074.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1077-1078.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -