'input'에 해당되는 글 1건

  1. 2010.11.29 [Linux] Writing input event directly.

[Linux] Writing input event directly.

Domain/Linux 2010.11.29 16:03

This is a kind of reminder.
(On Android)

Source code.

linux/input.h
    struct input_event;
: write 'struct input_event' to input event node.
ex.
    struct input_event ev;
    ...
    write(fd, &ev, sizeof(ev));
    ...

File system

/dev/input/*, /proc/bus/input/*

Touch event 
 

   type  code  value
<common> EV_ABS
EV_ABS
ABS_X
ABS_Y 
<value>
<value> 
Press (or Drag)Release EV_KEY
EV_KEY
BTN_TOUCH
BTN_TOUCH
1
0
<common>  EV_SYN 0 0

Key event

  type code value
Press EV_KEY <key code> 1
Release EV_KEY <key code> 0

Done. 
신고
tags : ,
Trackback 1 : Comment 0

티스토리 툴바