Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux ÐéÄâÊó±ê£¬¼üÅÌ Ö®Ò»¡£

Linux ÓÐ×Ô¼ºµÄ input ×Óϵͳ£¬¿ÉÒÔͳһ¹ÜÀíÊó±êºÍ¼üÅÌʼþ¡£
»ùÓÚÊäÈë×Óϵͳ ʵÏÖµÄ uinput ¿ÉÒÔ·½±ãµÄÔÚÓû§¿Õ¼äÄ£ÄâÊó±êºÍ¼üÅÌʼþ¡£
µ±È»£¬Ò²¿ÉÒÔ×Ô¼ºÔìÂÖ×Ó£¬ ×öÒ»¸ö×Ö·ûÉ豸½ÓÊÕÓû§ÊäÈ룬¸ù¾ÝÊäÈ룬ͶµÝ input ʼþ¡£
»¹ÓÐÒ»ÖÖ·½Ê½¾ÍÊÇÖ±½Ó Íù evnent ÀïдÈëÊý¾Ý£¬ ¶¼¿ÉÒÔ´ïµ½¿ØÖÆÊó±ê¼üÅ̵ŦÄÜ¡£
±¾ÆªÎÄÕ¾ÍÊÇÑÝʾֱ½ÓдÈë event µÄ·½·¨¡£
linux/input.hÖÐÓж¨Ò壬Õâ¸öÎļþ»¹¶¨ÒåÁ˱ê×¼°´¼üµÄ±àÂëµÈ
struct input_event {
    struct timeval time;  //°´¼üʱ¼ä
    __u16 type; //ÀàÐÍ£¬ÔÚÏÂÃæÓж¨Òå
    __u16 code; //ҪģÄâ³Éʲô°´¼ü
    __s32 value;//ÊÇ°´Ï»¹ÊÇÊÍ·Å
};
code£º
ʼþµÄ´úÂë.Èç¹ûʼþµÄÀàÐÍ´úÂëÊÇEV_KEY,¸Ã´úÂëcodeΪÉ豸¼üÅÌ´úÂë.´úÂëÖ²0~127Ϊ¼üÅÌÉϵİ´¼ü´úÂë, 0x110~0x116 ΪÊó±êÉÏ°´¼ü´úÂë,ÆäÖÐ0x110(BTN_ LEFT)ΪÊó±ê×ó¼ü,0x111(BTN_RIGHT)ΪÊó±êÓÒ¼ü,0x112(BTN_ MIDDLE)ΪÊó±êÖмü.ÆäËü´úÂ뺬ÒåÇë²Î¿´include/linux /input.hÎļþ. Èç¹ûʼþµÄÀàÐÍ´úÂëÊÇEV_REL,codeÖµ±íʾ¹ì¼£µÄÀàÐÍ.ÈçָʾÊó±êµÄXÖá·½Ïò REL_X (´úÂëΪ0x00),ָʾÊó±êµÄYÖá·½ÏòREL_Y(´úÂëΪ0x01),ָʾÊó±êÖÐÂÖ×Ó·½ÏòREL_WHEEL(´úÂëΪ0x08).
type:
EV_KEY,¼üÅÌ
EV_REL,Ïà¶Ô×ø±ê
EV_ABS,¾ø¶Ô×ø±ê
value£º
ʼþµÄÖµ.Èç¹ûʼþµÄÀàÐÍ´úÂëÊÇEV_KEY,µ±°´¼ü°´ÏÂʱֵΪ1,ËÉ¿ªÊ±ÖµÎª0;Èç¹ûʼþµÄÀàÐÍ´úÂëÊÇEV_ REL,valueµÄÕýÊýÖµºÍ¸ºÊýÖµ·Ö±ð´ú±íÁ½¸ö²»Í¬·½ÏòµÄÖµ.
/*
 * Event types
 */
#define EV_SYN            0x00
#define EV_KEY            0x01 //°´¼ü
#define EV_REL            0x02 //Ïà¶Ô×ø±ê(¹ì¼£Çò)
#define EV_ABS            0x03 //¾ø¶Ô×ø±ê
#define EV_MSC            0x04 //ÆäËû
#define EV_SW            0x05
#define EV_LED            0x11 //LED
#define EV_SND      &


Ïà¹ØÎĵµ£º

LinuxÄں˵Äͬ²½»úÖÆ

Ò»¡¢ÒýÑÔ
ÔÚÏÖ´ú²Ù×÷ϵͳÀͬһʱ¼ä¿ÉÄÜÓжà¸öÄÚºËÖ´ÐÐÁ÷ÔÚÖ´ÐУ¬Òò´ËÄÚºËÆäʵÏó¶à½ø³Ì¶àÏ̱߳à³ÌÒ»ÑùÒ²ÐèҪһЩͬ²½»úÖÆÀ´Í¬²½¸÷Ö´Ðе¥Ôª¶Ô¹²ÏíÊý¾ÝµÄ·ÃÎÊ¡£ÓÈÆäÊÇÔڶദÀíÆ÷ϵͳÉÏ£¬¸üÐèҪһЩͬ²½»úÖÆÀ´Í¬²½²»Í¬´¦ÀíÆ÷ÉϵÄÖ´Ðе¥Ôª¶Ô¹²ÏíµÄÊý¾ÝµÄ·ÃÎÊ¡£
ÔÚÖ÷Á÷µÄLinuxÄÚºËÖаüº¬Á˼¸ºõËùÓÐÏÖ´úµÄ²Ù×÷ϵͳ¾ßÓеÄͬ²½» ......

µÚ1Õ Linux¸ÅÊö

µÚ1Õ  Linux¸ÅÊö
ʲôÊÇLinux£¿ÔÚËùÓйØÓÚLinuxµÄÎÊÌâÖУ¬Ã»ÓбÈÕâ¸ö¸ü»ù±¾µÄÁË¡£¼òµ¥µØ˵£¬LinuxÊÇÒ»ÖÖ²Ù×÷ϵͳ£¬¿ÉÒÔ°²×°ÔÚ°üÀ¨·þÎñÆ÷¡¢¸öÈ˵çÄÔ¡¢ÄËÖÁPDA¡¢ÊÖ»ú¡¢´òÓ¡»úµÈ¸÷ÀàÉ豸ÖС£³¢ÊÔÒ»¸öеIJÙ×÷ϵͳÄÑÃâÈÃÈËÐij±ÅìÅÈ£¬Èç¹û¶ÁÕß֮ǰ»¹Ã»ÓнӴ¥¹ýLinuxµÄ»°£¬ÔÚÕýʽ¿ªÊ¼°²×°ºÍʹÓÃLinux֮ǰ£¬Ê×ÏÈÈÃ×Ô¼º·ÅËÉ£ ......

1.3 LinuxµÄ·¢Ðа汾

1.3  LinuxµÄ·¢Ðа汾
Ñϸñ˵À´£¬LinuxÕâ¸ö´Ê²¢²»ÄÜÖ¸´ú±¾ÊéËùÒª½éÉܵÄÕâ¸ö£¨»òÕß˵¼¸¸ö£©²Ù×÷ϵͳ¡£Linuxʵ¼ÊÉÏÖ»¶¨ÒåÁËÒ»¸ö²Ù×÷ϵͳÄںˣ¬Õâ¸öÄÚºËÓÉkernel.org¸ºÔðά»¤¡£²»Í¬µÄÆóÒµºÍ×éÖ¯ÔÚ´Ë»ù´¡ÉÏ¿ª·¢ÁËһϵÁи¨ÖúÈí¼þ£¬´ò°ü·¢²¼×Ô¼ºµÄ“·¢Ðа汾”¡£¸÷ÖÖ·¢Ðа汾¿ÉÒÔ“·Ç³£²»Í¬”£¬È´Êǽ¨Á ......

ÔÚLinuxϲúÉú²¢µ÷ÊÔcoreÎļþ

ÔÚLinuxϲúÉú²¢µ÷ÊÔcoreÎļþ
ÏÈ¿´¿´ÎÒÓõÄÊǸöʲô»úÆ÷£º
$ uname -a
Linux dev 2.4.21-9.30AXsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux
ÔÙ¿´¿´Ä¬ÈϵÄһЩ²ÎÊý£¬×¢Òâcore file sizeÊǸö0£¬³ÌÐò³ö´íʱ²»»á²úÉúcoreÎļþÁË¡£
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbyt ......

µÚ2ÕÂ Linux°²×°

µÚ2Õ Linux°²×°Á˽âÁËLinuxµÄÀúÊ·ºÍ·¢Õ¹¹ý³Ì£¬¶ÁÕß´ó¸ÅÒѾ­¼±ÇеØÏëÒª°ÑLinux°²×°µ½×Ô¼ºµÄ¼ÆËã»úÉÏ¡£ÎÞËùη¾åµÄ¶ÁÕß¿ÉÄÜÒѾ­ÔÚÔĶÁ±¾ÕÂ֮ǰ¾Í×ö¹ýÕâÑùµÄ³¢ÊÔ¡£ÎÞÂÛÕâЩ³¢ÊÔ×îÖÕÊdzɹ¦»¹ÊÇʧ°Ü£¬¾Í´ÓÕâÀ↑ʼLinuxÖ®Âðɣ¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ