最終更新:2013-10-31 (木) 06:37:33 (3829d)  

Linux/イベント
Top / Linux / イベント

kernel.org/doc/Documentation/input/event-codes.txt

input_event

  • イベントを表す構造体。
    struct input_event {
            struct timeval time;
            __u16 type;
            __u16 code;
            __s32 value;
    };
  • type,codeはlinux/input.hで定義されている

type,code

  • type:
  • code:
    • SYN_~ - Synchronization events.
    • KEY_~ - Keys
    • BTN_~ - Buttons
    • REL_~ - Relative axes
    • ABS_~ - Absolute axes
    • SW_?~ - Switch events
    • MSC_?~ - Misc events
    • LED_?~ - LEDs
    • REP_?~ - Autorepeat values
    • SND_?~ - Sounds

EV_SYN

  • Used as markers to separate events. Events may be separated in time or in space, such as with the multitouch protocol.

EV_KEY

  • Used to describe state changes of keyboards, buttons, or other key-like devices.
    • BTN_TOOL_<name>
    • BTN_TOUCH
    • BTN_TOOL_FINGER?
    • BTN_TOOL_DOUBLETAP?
    • BTN_TOOL_TRIPLETAP?
    • BTN_TOOL_QUADTAP?

EV_REL

  • Used to describe relative axis value changes, e.g. moving the mouse 5 units to the left.
    • REL_WHEEL?
    • REL_HWHEEL?

EV_ABS

EV_MSC?

  • Used to describe miscellaneous input data that do not fit into other types.

EV_SW?

  • Used to describe binary state input switches.

EV_LED?

  • Used to turn LEDs on devices on and off.

EV_SND?

  • Used to output sound to devices.

EV_REP

  • Used for autorepeating devices.

EV_FF?

  • Used to send force feedback commands to an input device.

EV_PWR?

  • A special type for power button and switch input.

EV_FF_STATUS?

  • Used to receive force feedback device status.

Linux/マルチタッチ

参考