| Linux :: Input. Linux :: ÀÔ·ÂÀº Linux ÀÔ·Â À̺¥Æ® ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Linux :: Input. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~beppu/
Linux :: Input. ű×
Linux :: Input. ¼³¸í
Linux :: ÀÔ·ÂÀº Linux ÀÔ·Â À̺¥Æ® ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. Linux :: ÀÔ·ÂÀº Linux ÀÔ·Â À̺¥Æ® ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. À̺¥Æ® API¸¦ »ç¿ëÇÑ Á¶À̽ºÆ½ My $ JS1 = Linux :: Input-> New ( '/ dev / input / event3'); (1) {@events = $ js1-> poll (0.01)) {foreach (@Event) {}}} ¿¹ : Á¶À̽ºÆ½ API (´Ù¸¥ À̺¥Æ® ±¸Á¶)¸¦ »ç¿ëÇÏ´Â Á¶À̽ºÆ½ 2 $ JS1 = Linux :: ÀÔ·Â :: Á¶À̽ºÆ½ -> »õ·Î¿î ( '/ dev / input / js0'); MY $ JS2 = Linux :: ÀÔ·Â :: Á¶À̽ºÆ½ -> New ( '/ dev / input / js1'); ³» $ selector = io :: select-> new (); $ selector-> add ($ js1-> fh); $ selector-> add ($ js2-> fh); while (my $ fh = $ selector-> can_read) {@event; if ($ fh == $ js1-> fh) {@event = $ js1-> poll ()} elsif ($ fh == $ js2-> fh) {@event = $ js2-> poll ()} foreach ( @Event) {# work}} ¿¹Á¦ 3 : ¸ðµç ÀÔ·Â ÀåÄ¡ ¸ð´ÏÅÍ ÆÄÀÏ :: BaseName QW (Basename); My @Inputs = ¸Ê { "/ dev / input /". Basename ($ _)}; ³» @dev; ³» $ selector = io :: select-> new (); foreach (@Inputs) {My $ device = Linux :: ÀÔ·Â -> »õ ($ _); $ SELector-> Ãß°¡ ($ ÀåÄ¡ -> FH); Ǫ½Ã @DEV, $ ÀåÄ¡; } while (my $ fh = $ selector-> can_read) {# work} ¿¹Á¦ 4 : ¸í·É ÁÙ¿¡¼ À̺¥Æ® Å×½ºÆ® # À̺¥Æ® ´ë±â¿¿¡ ¼ÓÇÑ ¾î¶² À̺¥Æ® Å¥¿¡ ¼ÓÇÑ Á¤º¸ CAT / PROC / ¹ö½º / ÀÔ·Â / ÀåÄ¡ #ÀÌ À̺¥Æ® È®ÀÎ sudo evtest.pl / dev / input / À̺¥Æ® * ¿ä±¸ »çÇ× : ¡¤ Perl.
Linux :: Input. °ü·Ã ¼ÒÇÁÆ®¿þ¾î