Class: Vigilem::Evdev::Device
- Inherits:
-
File
- Object
- File
- Vigilem::Evdev::Device
- Extended by:
- System::Input
- Includes:
- DeviceCapabilities, System::Input
- Defined in:
- lib/vigilem/evdev/device.rb
Constant Summary collapse
- BITS_PER_BYTE =
8
Constants included from System::Input::ForceFeedBack
System::Input::ForceFeedBack::FF_AUTOCENTER, System::Input::ForceFeedBack::FF_CNT, System::Input::ForceFeedBack::FF_CONSTANT, System::Input::ForceFeedBack::FF_CUSTOM, System::Input::ForceFeedBack::FF_DAMPER, System::Input::ForceFeedBack::FF_EFFECT_MAX, System::Input::ForceFeedBack::FF_EFFECT_MIN, System::Input::ForceFeedBack::FF_FRICTION, System::Input::ForceFeedBack::FF_GAIN, System::Input::ForceFeedBack::FF_INERTIA, System::Input::ForceFeedBack::FF_MAX, System::Input::ForceFeedBack::FF_PERIODIC, System::Input::ForceFeedBack::FF_RAMP, System::Input::ForceFeedBack::FF_RUMBLE, System::Input::ForceFeedBack::FF_SAW_DOWN, System::Input::ForceFeedBack::FF_SAW_UP, System::Input::ForceFeedBack::FF_SINE, System::Input::ForceFeedBack::FF_SPRING, System::Input::ForceFeedBack::FF_SQUARE, System::Input::ForceFeedBack::FF_STATUS_MAX, System::Input::ForceFeedBack::FF_STATUS_PLAYING, System::Input::ForceFeedBack::FF_STATUS_STOPPED, System::Input::ForceFeedBack::FF_TRIANGLE, System::Input::ForceFeedBack::FF_WAVEFORM_MAX, System::Input::ForceFeedBack::FF_WAVEFORM_MIN
Constants included from System::Input::MTTOOLTypes
System::Input::MTTOOLTypes::MT_TOOL_FINGER, System::Input::MTTOOLTypes::MT_TOOL_MAX, System::Input::MTTOOLTypes::MT_TOOL_PEN
Constants included from System::Input::IDs
System::Input::IDs::BUS_ADB, System::Input::IDs::BUS_AMIGA, System::Input::IDs::BUS_ATARI, System::Input::IDs::BUS_BLUETOOTH, System::Input::IDs::BUS_GAMEPORT, System::Input::IDs::BUS_GSC, System::Input::IDs::BUS_HIL, System::Input::IDs::BUS_HOST, System::Input::IDs::BUS_I2C, System::Input::IDs::BUS_I8042, System::Input::IDs::BUS_ISA, System::Input::IDs::BUS_ISAPNP, System::Input::IDs::BUS_PARPORT, System::Input::IDs::BUS_PCI, System::Input::IDs::BUS_RS232, System::Input::IDs::BUS_SPI, System::Input::IDs::BUS_USB, System::Input::IDs::BUS_VIRTUAL, System::Input::IDs::BUS_XTKBD, System::Input::IDs::ID_BUS, System::Input::IDs::ID_PRODUCT, System::Input::IDs::ID_VENDOR, System::Input::IDs::ID_VERSION
Constants included from System::Input::Sounds
System::Input::Sounds::SND_BELL, System::Input::Sounds::SND_CLICK, System::Input::Sounds::SND_CNT, System::Input::Sounds::SND_MAX, System::Input::Sounds::SND_TONE
Constants included from System::Input::AutorepeatValues
System::Input::AutorepeatValues::REP_CNT, System::Input::AutorepeatValues::REP_DELAY, System::Input::AutorepeatValues::REP_MAX, System::Input::AutorepeatValues::REP_PERIOD
Constants included from System::Input::LEDs
System::Input::LEDs::LED_CAPSL, System::Input::LEDs::LED_CHARGING, System::Input::LEDs::LED_CNT, System::Input::LEDs::LED_COMPOSE, System::Input::LEDs::LED_KANA, System::Input::LEDs::LED_MAIL, System::Input::LEDs::LED_MAX, System::Input::LEDs::LED_MISC, System::Input::LEDs::LED_MUTE, System::Input::LEDs::LED_NUML, System::Input::LEDs::LED_SCROLLL, System::Input::LEDs::LED_SLEEP, System::Input::LEDs::LED_SUSPEND
Constants included from System::Input::MiscEvents
System::Input::MiscEvents::MSC_CNT, System::Input::MiscEvents::MSC_GESTURE, System::Input::MiscEvents::MSC_MAX, System::Input::MiscEvents::MSC_PULSELED, System::Input::MiscEvents::MSC_RAW, System::Input::MiscEvents::MSC_SCAN, System::Input::MiscEvents::MSC_SERIAL, System::Input::MiscEvents::MSC_TIMESTAMP
Constants included from System::Input::SwitchEvents
System::Input::SwitchEvents::SW_CAMERA_LENS_COVER, System::Input::SwitchEvents::SW_CNT, System::Input::SwitchEvents::SW_DOCK, System::Input::SwitchEvents::SW_FRONT_PROXIMITY, System::Input::SwitchEvents::SW_HEADPHONE_INSERT, System::Input::SwitchEvents::SW_JACK_PHYSICAL_INSERT, System::Input::SwitchEvents::SW_KEYPAD_SLIDE, System::Input::SwitchEvents::SW_LID, System::Input::SwitchEvents::SW_LINEIN_INSERT, System::Input::SwitchEvents::SW_LINEOUT_INSERT, System::Input::SwitchEvents::SW_MAX, System::Input::SwitchEvents::SW_MICROPHONE_INSERT, System::Input::SwitchEvents::SW_MUTE_DEVICE, System::Input::SwitchEvents::SW_RADIO, System::Input::SwitchEvents::SW_RFKILL_ALL, System::Input::SwitchEvents::SW_ROTATE_LOCK, System::Input::SwitchEvents::SW_TABLET_MODE, System::Input::SwitchEvents::SW_VIDEOOUT_INSERT
Constants included from System::Input::AbsoluteAxes
System::Input::AbsoluteAxes::ABS_BRAKE, System::Input::AbsoluteAxes::ABS_CNT, System::Input::AbsoluteAxes::ABS_DISTANCE, System::Input::AbsoluteAxes::ABS_GAS, System::Input::AbsoluteAxes::ABS_HAT0X, System::Input::AbsoluteAxes::ABS_HAT0Y, System::Input::AbsoluteAxes::ABS_HAT1X, System::Input::AbsoluteAxes::ABS_HAT1Y, System::Input::AbsoluteAxes::ABS_HAT2X, System::Input::AbsoluteAxes::ABS_HAT2Y, System::Input::AbsoluteAxes::ABS_HAT3X, System::Input::AbsoluteAxes::ABS_HAT3Y, System::Input::AbsoluteAxes::ABS_MAX, System::Input::AbsoluteAxes::ABS_MISC, System::Input::AbsoluteAxes::ABS_MT_BLOB_ID, System::Input::AbsoluteAxes::ABS_MT_DISTANCE, System::Input::AbsoluteAxes::ABS_MT_ORIENTATION, System::Input::AbsoluteAxes::ABS_MT_POSITION_X, System::Input::AbsoluteAxes::ABS_MT_POSITION_Y, System::Input::AbsoluteAxes::ABS_MT_PRESSURE, System::Input::AbsoluteAxes::ABS_MT_SLOT, System::Input::AbsoluteAxes::ABS_MT_TOOL_TYPE, System::Input::AbsoluteAxes::ABS_MT_TOOL_X, System::Input::AbsoluteAxes::ABS_MT_TOOL_Y, System::Input::AbsoluteAxes::ABS_MT_TOUCH_MAJOR, System::Input::AbsoluteAxes::ABS_MT_TOUCH_MINOR, System::Input::AbsoluteAxes::ABS_MT_TRACKING_ID, System::Input::AbsoluteAxes::ABS_MT_WIDTH_MAJOR, System::Input::AbsoluteAxes::ABS_MT_WIDTH_MINOR, System::Input::AbsoluteAxes::ABS_PRESSURE, System::Input::AbsoluteAxes::ABS_RUDDER, System::Input::AbsoluteAxes::ABS_RX, System::Input::AbsoluteAxes::ABS_RY, System::Input::AbsoluteAxes::ABS_RZ, System::Input::AbsoluteAxes::ABS_THROTTLE, System::Input::AbsoluteAxes::ABS_TILT_X, System::Input::AbsoluteAxes::ABS_TILT_Y, System::Input::AbsoluteAxes::ABS_TOOL_WIDTH, System::Input::AbsoluteAxes::ABS_VOLUME, System::Input::AbsoluteAxes::ABS_WHEEL, System::Input::AbsoluteAxes::ABS_X, System::Input::AbsoluteAxes::ABS_Y, System::Input::AbsoluteAxes::ABS_Z
Constants included from System::Input::RelativeAxes
System::Input::RelativeAxes::REL_CNT, System::Input::RelativeAxes::REL_DIAL, System::Input::RelativeAxes::REL_HWHEEL, System::Input::RelativeAxes::REL_MAX, System::Input::RelativeAxes::REL_MISC, System::Input::RelativeAxes::REL_RX, System::Input::RelativeAxes::REL_RY, System::Input::RelativeAxes::REL_RZ, System::Input::RelativeAxes::REL_WHEEL, System::Input::RelativeAxes::REL_X, System::Input::RelativeAxes::REL_Y, System::Input::RelativeAxes::REL_Z
Constants included from System::Input::KeysAndButtons
System::Input::KeysAndButtons::BTN_0, System::Input::KeysAndButtons::BTN_1, System::Input::KeysAndButtons::BTN_2, System::Input::KeysAndButtons::BTN_3, System::Input::KeysAndButtons::BTN_4, System::Input::KeysAndButtons::BTN_5, System::Input::KeysAndButtons::BTN_6, System::Input::KeysAndButtons::BTN_7, System::Input::KeysAndButtons::BTN_8, System::Input::KeysAndButtons::BTN_9, System::Input::KeysAndButtons::BTN_A, System::Input::KeysAndButtons::BTN_B, System::Input::KeysAndButtons::BTN_BACK, System::Input::KeysAndButtons::BTN_BASE, System::Input::KeysAndButtons::BTN_BASE2, System::Input::KeysAndButtons::BTN_BASE3, System::Input::KeysAndButtons::BTN_BASE4, System::Input::KeysAndButtons::BTN_BASE5, System::Input::KeysAndButtons::BTN_BASE6, System::Input::KeysAndButtons::BTN_C, System::Input::KeysAndButtons::BTN_DEAD, System::Input::KeysAndButtons::BTN_DIGI, System::Input::KeysAndButtons::BTN_DPAD_DOWN, System::Input::KeysAndButtons::BTN_DPAD_LEFT, System::Input::KeysAndButtons::BTN_DPAD_RIGHT, System::Input::KeysAndButtons::BTN_DPAD_UP, System::Input::KeysAndButtons::BTN_EAST, System::Input::KeysAndButtons::BTN_EXTRA, System::Input::KeysAndButtons::BTN_FORWARD, System::Input::KeysAndButtons::BTN_GAMEPAD, System::Input::KeysAndButtons::BTN_GEAR_DOWN, System::Input::KeysAndButtons::BTN_GEAR_UP, System::Input::KeysAndButtons::BTN_JOYSTICK, System::Input::KeysAndButtons::BTN_LEFT, System::Input::KeysAndButtons::BTN_MIDDLE, System::Input::KeysAndButtons::BTN_MISC, System::Input::KeysAndButtons::BTN_MODE, System::Input::KeysAndButtons::BTN_MOUSE, System::Input::KeysAndButtons::BTN_NORTH, System::Input::KeysAndButtons::BTN_PINKIE, System::Input::KeysAndButtons::BTN_RIGHT, System::Input::KeysAndButtons::BTN_SELECT, System::Input::KeysAndButtons::BTN_SIDE, System::Input::KeysAndButtons::BTN_SOUTH, System::Input::KeysAndButtons::BTN_START, System::Input::KeysAndButtons::BTN_STYLUS, System::Input::KeysAndButtons::BTN_STYLUS2, System::Input::KeysAndButtons::BTN_TASK, System::Input::KeysAndButtons::BTN_THUMB, System::Input::KeysAndButtons::BTN_THUMB2, System::Input::KeysAndButtons::BTN_THUMBL, System::Input::KeysAndButtons::BTN_THUMBR, System::Input::KeysAndButtons::BTN_TL, System::Input::KeysAndButtons::BTN_TL2, System::Input::KeysAndButtons::BTN_TOOL_AIRBRUSH, System::Input::KeysAndButtons::BTN_TOOL_BRUSH, System::Input::KeysAndButtons::BTN_TOOL_DOUBLETAP, System::Input::KeysAndButtons::BTN_TOOL_FINGER, System::Input::KeysAndButtons::BTN_TOOL_LENS, System::Input::KeysAndButtons::BTN_TOOL_MOUSE, System::Input::KeysAndButtons::BTN_TOOL_PEN, System::Input::KeysAndButtons::BTN_TOOL_PENCIL, System::Input::KeysAndButtons::BTN_TOOL_QUADTAP, System::Input::KeysAndButtons::BTN_TOOL_QUINTTAP, System::Input::KeysAndButtons::BTN_TOOL_RUBBER, System::Input::KeysAndButtons::BTN_TOOL_TRIPLETAP, System::Input::KeysAndButtons::BTN_TOP, System::Input::KeysAndButtons::BTN_TOP2, System::Input::KeysAndButtons::BTN_TOUCH, System::Input::KeysAndButtons::BTN_TR, System::Input::KeysAndButtons::BTN_TR2, System::Input::KeysAndButtons::BTN_TRIGGER, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY1, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY10, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY11, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY12, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY13, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY14, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY15, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY16, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY17, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY18, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY19, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY2, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY20, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY21, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY22, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY23, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY24, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY25, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY26, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY27, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY28, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY29, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY3, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY30, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY31, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY32, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY33, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY34, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY35, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY36, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY37, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY38, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY39, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY4, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY40, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY5, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY6, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY7, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY8, System::Input::KeysAndButtons::BTN_TRIGGER_HAPPY9, System::Input::KeysAndButtons::BTN_WEST, System::Input::KeysAndButtons::BTN_WHEEL, System::Input::KeysAndButtons::BTN_X, System::Input::KeysAndButtons::BTN_Y, System::Input::KeysAndButtons::BTN_Z, System::Input::KeysAndButtons::KEY_0, System::Input::KeysAndButtons::KEY_1, System::Input::KeysAndButtons::KEY_102ND, System::Input::KeysAndButtons::KEY_10CHANNELSDOWN, System::Input::KeysAndButtons::KEY_10CHANNELSUP, System::Input::KeysAndButtons::KEY_2, System::Input::KeysAndButtons::KEY_3, System::Input::KeysAndButtons::KEY_4, System::Input::KeysAndButtons::KEY_5, System::Input::KeysAndButtons::KEY_6, System::Input::KeysAndButtons::KEY_7, System::Input::KeysAndButtons::KEY_8, System::Input::KeysAndButtons::KEY_9, System::Input::KeysAndButtons::KEY_A, System::Input::KeysAndButtons::KEY_AB, System::Input::KeysAndButtons::KEY_ADDRESSBOOK, System::Input::KeysAndButtons::KEY_AGAIN, System::Input::KeysAndButtons::KEY_ALS_TOGGLE, System::Input::KeysAndButtons::KEY_ALTERASE, System::Input::KeysAndButtons::KEY_ANGLE, System::Input::KeysAndButtons::KEY_APOSTROPHE, System::Input::KeysAndButtons::KEY_APPSELECT, System::Input::KeysAndButtons::KEY_ARCHIVE, System::Input::KeysAndButtons::KEY_ATTENDANT_OFF, System::Input::KeysAndButtons::KEY_ATTENDANT_ON, System::Input::KeysAndButtons::KEY_ATTENDANT_TOGGLE, System::Input::KeysAndButtons::KEY_AUDIO, System::Input::KeysAndButtons::KEY_AUX, System::Input::KeysAndButtons::KEY_B, System::Input::KeysAndButtons::KEY_BACK, System::Input::KeysAndButtons::KEY_BACKSLASH, System::Input::KeysAndButtons::KEY_BACKSPACE, System::Input::KeysAndButtons::KEY_BASSBOOST, System::Input::KeysAndButtons::KEY_BATTERY, System::Input::KeysAndButtons::KEY_BLUE, System::Input::KeysAndButtons::KEY_BLUETOOTH, System::Input::KeysAndButtons::KEY_BOOKMARKS, System::Input::KeysAndButtons::KEY_BREAK, System::Input::KeysAndButtons::KEY_BRIGHTNESSDOWN, System::Input::KeysAndButtons::KEY_BRIGHTNESSUP, System::Input::KeysAndButtons::KEY_BRIGHTNESS_AUTO, System::Input::KeysAndButtons::KEY_BRIGHTNESS_CYCLE, System::Input::KeysAndButtons::KEY_BRIGHTNESS_MAX, System::Input::KeysAndButtons::KEY_BRIGHTNESS_MIN, System::Input::KeysAndButtons::KEY_BRIGHTNESS_TOGGLE, System::Input::KeysAndButtons::KEY_BRIGHTNESS_ZERO, System::Input::KeysAndButtons::KEY_BRL_DOT1, System::Input::KeysAndButtons::KEY_BRL_DOT10, System::Input::KeysAndButtons::KEY_BRL_DOT2, System::Input::KeysAndButtons::KEY_BRL_DOT3, System::Input::KeysAndButtons::KEY_BRL_DOT4, System::Input::KeysAndButtons::KEY_BRL_DOT5, System::Input::KeysAndButtons::KEY_BRL_DOT6, System::Input::KeysAndButtons::KEY_BRL_DOT7, System::Input::KeysAndButtons::KEY_BRL_DOT8, System::Input::KeysAndButtons::KEY_BRL_DOT9, System::Input::KeysAndButtons::KEY_BUTTONCONFIG, System::Input::KeysAndButtons::KEY_C, System::Input::KeysAndButtons::KEY_CALC, System::Input::KeysAndButtons::KEY_CALENDAR, System::Input::KeysAndButtons::KEY_CAMERA, System::Input::KeysAndButtons::KEY_CAMERA_DOWN, System::Input::KeysAndButtons::KEY_CAMERA_FOCUS, System::Input::KeysAndButtons::KEY_CAMERA_LEFT, System::Input::KeysAndButtons::KEY_CAMERA_RIGHT, System::Input::KeysAndButtons::KEY_CAMERA_UP, System::Input::KeysAndButtons::KEY_CAMERA_ZOOMIN, System::Input::KeysAndButtons::KEY_CAMERA_ZOOMOUT, System::Input::KeysAndButtons::KEY_CANCEL, System::Input::KeysAndButtons::KEY_CAPSLOCK, System::Input::KeysAndButtons::KEY_CD, System::Input::KeysAndButtons::KEY_CHANNEL, System::Input::KeysAndButtons::KEY_CHANNELDOWN, System::Input::KeysAndButtons::KEY_CHANNELUP, System::Input::KeysAndButtons::KEY_CHAT, System::Input::KeysAndButtons::KEY_CLEAR, System::Input::KeysAndButtons::KEY_CLOSE, System::Input::KeysAndButtons::KEY_CLOSECD, System::Input::KeysAndButtons::KEY_CNT, System::Input::KeysAndButtons::KEY_COFFEE, System::Input::KeysAndButtons::KEY_COMMA, System::Input::KeysAndButtons::KEY_COMPOSE, System::Input::KeysAndButtons::KEY_COMPUTER, System::Input::KeysAndButtons::KEY_CONFIG, System::Input::KeysAndButtons::KEY_CONNECT, System::Input::KeysAndButtons::KEY_CONTEXT_MENU, System::Input::KeysAndButtons::KEY_CONTROLPANEL, System::Input::KeysAndButtons::KEY_COPY, System::Input::KeysAndButtons::KEY_CUT, System::Input::KeysAndButtons::KEY_CYCLEWINDOWS, System::Input::KeysAndButtons::KEY_D, System::Input::KeysAndButtons::KEY_DASHBOARD, System::Input::KeysAndButtons::KEY_DATABASE, System::Input::KeysAndButtons::KEY_DELETE, System::Input::KeysAndButtons::KEY_DELETEFILE, System::Input::KeysAndButtons::KEY_DEL_EOL, System::Input::KeysAndButtons::KEY_DEL_EOS, System::Input::KeysAndButtons::KEY_DEL_LINE, System::Input::KeysAndButtons::KEY_DIGITS, System::Input::KeysAndButtons::KEY_DIRECTION, System::Input::KeysAndButtons::KEY_DIRECTORY, System::Input::KeysAndButtons::KEY_DISPLAYTOGGLE, System::Input::KeysAndButtons::KEY_DISPLAY_OFF, System::Input::KeysAndButtons::KEY_DOCUMENTS, System::Input::KeysAndButtons::KEY_DOLLAR, System::Input::KeysAndButtons::KEY_DOT, System::Input::KeysAndButtons::KEY_DOWN, System::Input::KeysAndButtons::KEY_DVD, System::Input::KeysAndButtons::KEY_E, System::Input::KeysAndButtons::KEY_EDIT, System::Input::KeysAndButtons::KEY_EDITOR, System::Input::KeysAndButtons::KEY_EJECTCD, System::Input::KeysAndButtons::KEY_EJECTCLOSECD, System::Input::KeysAndButtons::KEY_EMAIL, System::Input::KeysAndButtons::KEY_END, System::Input::KeysAndButtons::KEY_ENTER, System::Input::KeysAndButtons::KEY_EPG, System::Input::KeysAndButtons::KEY_EQUAL, System::Input::KeysAndButtons::KEY_ESC, System::Input::KeysAndButtons::KEY_EURO, System::Input::KeysAndButtons::KEY_EXIT, System::Input::KeysAndButtons::KEY_F, System::Input::KeysAndButtons::KEY_F1, System::Input::KeysAndButtons::KEY_F10, System::Input::KeysAndButtons::KEY_F11, System::Input::KeysAndButtons::KEY_F12, System::Input::KeysAndButtons::KEY_F13, System::Input::KeysAndButtons::KEY_F14, System::Input::KeysAndButtons::KEY_F15, System::Input::KeysAndButtons::KEY_F16, System::Input::KeysAndButtons::KEY_F17, System::Input::KeysAndButtons::KEY_F18, System::Input::KeysAndButtons::KEY_F19, System::Input::KeysAndButtons::KEY_F2, System::Input::KeysAndButtons::KEY_F20, System::Input::KeysAndButtons::KEY_F21, System::Input::KeysAndButtons::KEY_F22, System::Input::KeysAndButtons::KEY_F23, System::Input::KeysAndButtons::KEY_F24, System::Input::KeysAndButtons::KEY_F3, System::Input::KeysAndButtons::KEY_F4, System::Input::KeysAndButtons::KEY_F5, System::Input::KeysAndButtons::KEY_F6, System::Input::KeysAndButtons::KEY_F7, System::Input::KeysAndButtons::KEY_F8, System::Input::KeysAndButtons::KEY_F9, System::Input::KeysAndButtons::KEY_FASTFORWARD, System::Input::KeysAndButtons::KEY_FAVORITES, System::Input::KeysAndButtons::KEY_FILE, System::Input::KeysAndButtons::KEY_FINANCE, System::Input::KeysAndButtons::KEY_FIND, System::Input::KeysAndButtons::KEY_FIRST, System::Input::KeysAndButtons::KEY_FN, System::Input::KeysAndButtons::KEY_FN_1, System::Input::KeysAndButtons::KEY_FN_2, System::Input::KeysAndButtons::KEY_FN_B, System::Input::KeysAndButtons::KEY_FN_D, System::Input::KeysAndButtons::KEY_FN_E, System::Input::KeysAndButtons::KEY_FN_ESC, System::Input::KeysAndButtons::KEY_FN_F, System::Input::KeysAndButtons::KEY_FN_F1, System::Input::KeysAndButtons::KEY_FN_F10, System::Input::KeysAndButtons::KEY_FN_F11, System::Input::KeysAndButtons::KEY_FN_F12, System::Input::KeysAndButtons::KEY_FN_F2, System::Input::KeysAndButtons::KEY_FN_F3, System::Input::KeysAndButtons::KEY_FN_F4, System::Input::KeysAndButtons::KEY_FN_F5, System::Input::KeysAndButtons::KEY_FN_F6, System::Input::KeysAndButtons::KEY_FN_F7, System::Input::KeysAndButtons::KEY_FN_F8, System::Input::KeysAndButtons::KEY_FN_F9, System::Input::KeysAndButtons::KEY_FN_S, System::Input::KeysAndButtons::KEY_FORWARD, System::Input::KeysAndButtons::KEY_FORWARDMAIL, System::Input::KeysAndButtons::KEY_FRAMEBACK, System::Input::KeysAndButtons::KEY_FRAMEFORWARD, System::Input::KeysAndButtons::KEY_FRONT, System::Input::KeysAndButtons::KEY_G, System::Input::KeysAndButtons::KEY_GAMES, System::Input::KeysAndButtons::KEY_GOTO, System::Input::KeysAndButtons::KEY_GRAPHICSEDITOR, System::Input::KeysAndButtons::KEY_GRAVE, System::Input::KeysAndButtons::KEY_GREEN, System::Input::KeysAndButtons::KEY_H, System::Input::KeysAndButtons::KEY_HANGEUL, System::Input::KeysAndButtons::KEY_HANGUEL, System::Input::KeysAndButtons::KEY_HANJA, System::Input::KeysAndButtons::KEY_HELP, System::Input::KeysAndButtons::KEY_HENKAN, System::Input::KeysAndButtons::KEY_HIRAGANA, System::Input::KeysAndButtons::KEY_HOME, System::Input::KeysAndButtons::KEY_HOMEPAGE, System::Input::KeysAndButtons::KEY_HP, System::Input::KeysAndButtons::KEY_I, System::Input::KeysAndButtons::KEY_IMAGES, System::Input::KeysAndButtons::KEY_INFO, System::Input::KeysAndButtons::KEY_INSERT, System::Input::KeysAndButtons::KEY_INS_LINE, System::Input::KeysAndButtons::KEY_ISO, System::Input::KeysAndButtons::KEY_J, System::Input::KeysAndButtons::KEY_JOURNAL, System::Input::KeysAndButtons::KEY_K, System::Input::KeysAndButtons::KEY_KATAKANA, System::Input::KeysAndButtons::KEY_KATAKANAHIRAGANA, System::Input::KeysAndButtons::KEY_KBDILLUMDOWN, System::Input::KeysAndButtons::KEY_KBDILLUMTOGGLE, System::Input::KeysAndButtons::KEY_KBDILLUMUP, System::Input::KeysAndButtons::KEY_KBDINPUTASSIST_ACCEPT, System::Input::KeysAndButtons::KEY_KBDINPUTASSIST_CANCEL, System::Input::KeysAndButtons::KEY_KBDINPUTASSIST_NEXT, System::Input::KeysAndButtons::KEY_KBDINPUTASSIST_NEXTGROUP, System::Input::KeysAndButtons::KEY_KBDINPUTASSIST_PREV, System::Input::KeysAndButtons::KEY_KBDINPUTASSIST_PREVGROUP, System::Input::KeysAndButtons::KEY_KEYBOARD, System::Input::KeysAndButtons::KEY_KP0, System::Input::KeysAndButtons::KEY_KP1, System::Input::KeysAndButtons::KEY_KP2, System::Input::KeysAndButtons::KEY_KP3, System::Input::KeysAndButtons::KEY_KP4, System::Input::KeysAndButtons::KEY_KP5, System::Input::KeysAndButtons::KEY_KP6, System::Input::KeysAndButtons::KEY_KP7, System::Input::KeysAndButtons::KEY_KP8, System::Input::KeysAndButtons::KEY_KP9, System::Input::KeysAndButtons::KEY_KPASTERISK, System::Input::KeysAndButtons::KEY_KPCOMMA, System::Input::KeysAndButtons::KEY_KPDOT, System::Input::KeysAndButtons::KEY_KPENTER, System::Input::KeysAndButtons::KEY_KPEQUAL, System::Input::KeysAndButtons::KEY_KPJPCOMMA, System::Input::KeysAndButtons::KEY_KPLEFTPAREN, System::Input::KeysAndButtons::KEY_KPMINUS, System::Input::KeysAndButtons::KEY_KPPLUS, System::Input::KeysAndButtons::KEY_KPPLUSMINUS, System::Input::KeysAndButtons::KEY_KPRIGHTPAREN, System::Input::KeysAndButtons::KEY_KPSLASH, System::Input::KeysAndButtons::KEY_L, System::Input::KeysAndButtons::KEY_LANGUAGE, System::Input::KeysAndButtons::KEY_LAST, System::Input::KeysAndButtons::KEY_LEFT, System::Input::KeysAndButtons::KEY_LEFTALT, System::Input::KeysAndButtons::KEY_LEFTBRACE, System::Input::KeysAndButtons::KEY_LEFTCTRL, System::Input::KeysAndButtons::KEY_LEFTMETA, System::Input::KeysAndButtons::KEY_LEFTSHIFT, System::Input::KeysAndButtons::KEY_LIGHTS_TOGGLE, System::Input::KeysAndButtons::KEY_LINEFEED, System::Input::KeysAndButtons::KEY_LIST, System::Input::KeysAndButtons::KEY_LOGOFF, System::Input::KeysAndButtons::KEY_M, System::Input::KeysAndButtons::KEY_MACRO, System::Input::KeysAndButtons::KEY_MAIL, System::Input::KeysAndButtons::KEY_MAX, System::Input::KeysAndButtons::KEY_MEDIA, System::Input::KeysAndButtons::KEY_MEDIA_REPEAT, System::Input::KeysAndButtons::KEY_MEMO, System::Input::KeysAndButtons::KEY_MENU, System::Input::KeysAndButtons::KEY_MESSENGER, System::Input::KeysAndButtons::KEY_MHP, System::Input::KeysAndButtons::KEY_MICMUTE, System::Input::KeysAndButtons::KEY_MINUS, System::Input::KeysAndButtons::KEY_MIN_INTERESTING, System::Input::KeysAndButtons::KEY_MODE, System::Input::KeysAndButtons::KEY_MOVE, System::Input::KeysAndButtons::KEY_MP3, System::Input::KeysAndButtons::KEY_MSDOS, System::Input::KeysAndButtons::KEY_MUHENKAN, System::Input::KeysAndButtons::KEY_MUTE, System::Input::KeysAndButtons::KEY_N, System::Input::KeysAndButtons::KEY_NEW, System::Input::KeysAndButtons::KEY_NEWS, System::Input::KeysAndButtons::KEY_NEXT, System::Input::KeysAndButtons::KEY_NEXTSONG, System::Input::KeysAndButtons::KEY_NUMERIC_0, System::Input::KeysAndButtons::KEY_NUMERIC_1, System::Input::KeysAndButtons::KEY_NUMERIC_2, System::Input::KeysAndButtons::KEY_NUMERIC_3, System::Input::KeysAndButtons::KEY_NUMERIC_4, System::Input::KeysAndButtons::KEY_NUMERIC_5, System::Input::KeysAndButtons::KEY_NUMERIC_6, System::Input::KeysAndButtons::KEY_NUMERIC_7, System::Input::KeysAndButtons::KEY_NUMERIC_8, System::Input::KeysAndButtons::KEY_NUMERIC_9, System::Input::KeysAndButtons::KEY_NUMERIC_POUND, System::Input::KeysAndButtons::KEY_NUMERIC_STAR, System::Input::KeysAndButtons::KEY_NUMLOCK, System::Input::KeysAndButtons::KEY_O, System::Input::KeysAndButtons::KEY_OK, System::Input::KeysAndButtons::KEY_OPEN, System::Input::KeysAndButtons::KEY_OPTION, System::Input::KeysAndButtons::KEY_P, System::Input::KeysAndButtons::KEY_PAGEDOWN, System::Input::KeysAndButtons::KEY_PAGEUP, System::Input::KeysAndButtons::KEY_PASTE, System::Input::KeysAndButtons::KEY_PAUSE, System::Input::KeysAndButtons::KEY_PAUSECD, System::Input::KeysAndButtons::KEY_PC, System::Input::KeysAndButtons::KEY_PHONE, System::Input::KeysAndButtons::KEY_PLAY, System::Input::KeysAndButtons::KEY_PLAYCD, System::Input::KeysAndButtons::KEY_PLAYER, System::Input::KeysAndButtons::KEY_PLAYPAUSE, System::Input::KeysAndButtons::KEY_POWER, System::Input::KeysAndButtons::KEY_POWER2, System::Input::KeysAndButtons::KEY_PRESENTATION, System::Input::KeysAndButtons::KEY_PREVIOUS, System::Input::KeysAndButtons::KEY_PREVIOUSSONG, System::Input::KeysAndButtons::KEY_PRINT, System::Input::KeysAndButtons::KEY_PROG1, System::Input::KeysAndButtons::KEY_PROG2, System::Input::KeysAndButtons::KEY_PROG3, System::Input::KeysAndButtons::KEY_PROG4, System::Input::KeysAndButtons::KEY_PROGRAM, System::Input::KeysAndButtons::KEY_PROPS, System::Input::KeysAndButtons::KEY_PVR, System::Input::KeysAndButtons::KEY_Q, System::Input::KeysAndButtons::KEY_QUESTION, System::Input::KeysAndButtons::KEY_R, System::Input::KeysAndButtons::KEY_RADIO, System::Input::KeysAndButtons::KEY_RECORD, System::Input::KeysAndButtons::KEY_RED, System::Input::KeysAndButtons::KEY_REDO, System::Input::KeysAndButtons::KEY_REFRESH, System::Input::KeysAndButtons::KEY_REPLY, System::Input::KeysAndButtons::KEY_RESERVED, System::Input::KeysAndButtons::KEY_RESTART, System::Input::KeysAndButtons::KEY_REWIND, System::Input::KeysAndButtons::KEY_RFKILL, System::Input::KeysAndButtons::KEY_RIGHT, System::Input::KeysAndButtons::KEY_RIGHTALT, System::Input::KeysAndButtons::KEY_RIGHTBRACE, System::Input::KeysAndButtons::KEY_RIGHTCTRL, System::Input::KeysAndButtons::KEY_RIGHTMETA, System::Input::KeysAndButtons::KEY_RIGHTSHIFT, System::Input::KeysAndButtons::KEY_RO, System::Input::KeysAndButtons::KEY_S, System::Input::KeysAndButtons::KEY_SAT, System::Input::KeysAndButtons::KEY_SAT2, System::Input::KeysAndButtons::KEY_SAVE, System::Input::KeysAndButtons::KEY_SCALE, System::Input::KeysAndButtons::KEY_SCREEN, System::Input::KeysAndButtons::KEY_SCREENLOCK, System::Input::KeysAndButtons::KEY_SCREENSAVER, System::Input::KeysAndButtons::KEY_SCROLLDOWN, System::Input::KeysAndButtons::KEY_SCROLLLOCK, System::Input::KeysAndButtons::KEY_SCROLLUP, System::Input::KeysAndButtons::KEY_SEARCH, System::Input::KeysAndButtons::KEY_SELECT, System::Input::KeysAndButtons::KEY_SEMICOLON, System::Input::KeysAndButtons::KEY_SEND, System::Input::KeysAndButtons::KEY_SENDFILE, System::Input::KeysAndButtons::KEY_SETUP, System::Input::KeysAndButtons::KEY_SHOP, System::Input::KeysAndButtons::KEY_SHUFFLE, System::Input::KeysAndButtons::KEY_SLASH, System::Input::KeysAndButtons::KEY_SLEEP, System::Input::KeysAndButtons::KEY_SLOW, System::Input::KeysAndButtons::KEY_SOUND, System::Input::KeysAndButtons::KEY_SPACE, System::Input::KeysAndButtons::KEY_SPELLCHECK, System::Input::KeysAndButtons::KEY_SPORT, System::Input::KeysAndButtons::KEY_SPREADSHEET, System::Input::KeysAndButtons::KEY_STOP, System::Input::KeysAndButtons::KEY_STOPCD, System::Input::KeysAndButtons::KEY_SUBTITLE, System::Input::KeysAndButtons::KEY_SUSPEND, System::Input::KeysAndButtons::KEY_SWITCHVIDEOMODE, System::Input::KeysAndButtons::KEY_SYSRQ, System::Input::KeysAndButtons::KEY_T, System::Input::KeysAndButtons::KEY_TAB, System::Input::KeysAndButtons::KEY_TAPE, System::Input::KeysAndButtons::KEY_TASKMANAGER, System::Input::KeysAndButtons::KEY_TEEN, System::Input::KeysAndButtons::KEY_TEXT, System::Input::KeysAndButtons::KEY_TIME, System::Input::KeysAndButtons::KEY_TITLE, System::Input::KeysAndButtons::KEY_TOUCHPAD_OFF, System::Input::KeysAndButtons::KEY_TOUCHPAD_ON, System::Input::KeysAndButtons::KEY_TOUCHPAD_TOGGLE, System::Input::KeysAndButtons::KEY_TUNER, System::Input::KeysAndButtons::KEY_TV, System::Input::KeysAndButtons::KEY_TV2, System::Input::KeysAndButtons::KEY_TWEN, System::Input::KeysAndButtons::KEY_U, System::Input::KeysAndButtons::KEY_UNDO, System::Input::KeysAndButtons::KEY_UNKNOWN, System::Input::KeysAndButtons::KEY_UP, System::Input::KeysAndButtons::KEY_UWB, System::Input::KeysAndButtons::KEY_V, System::Input::KeysAndButtons::KEY_VCR, System::Input::KeysAndButtons::KEY_VCR2, System::Input::KeysAndButtons::KEY_VENDOR, System::Input::KeysAndButtons::KEY_VIDEO, System::Input::KeysAndButtons::KEY_VIDEOPHONE, System::Input::KeysAndButtons::KEY_VIDEO_NEXT, System::Input::KeysAndButtons::KEY_VIDEO_PREV, System::Input::KeysAndButtons::KEY_VOICECOMMAND, System::Input::KeysAndButtons::KEY_VOICEMAIL, System::Input::KeysAndButtons::KEY_VOLUMEDOWN, System::Input::KeysAndButtons::KEY_VOLUMEUP, System::Input::KeysAndButtons::KEY_W, System::Input::KeysAndButtons::KEY_WAKEUP, System::Input::KeysAndButtons::KEY_WIMAX, System::Input::KeysAndButtons::KEY_WLAN, System::Input::KeysAndButtons::KEY_WORDPROCESSOR, System::Input::KeysAndButtons::KEY_WPS_BUTTON, System::Input::KeysAndButtons::KEY_WWAN, System::Input::KeysAndButtons::KEY_WWW, System::Input::KeysAndButtons::KEY_X, System::Input::KeysAndButtons::KEY_XFER, System::Input::KeysAndButtons::KEY_Y, System::Input::KeysAndButtons::KEY_YELLOW, System::Input::KeysAndButtons::KEY_YEN, System::Input::KeysAndButtons::KEY_Z, System::Input::KeysAndButtons::KEY_ZENKAKUHANKAKU, System::Input::KeysAndButtons::KEY_ZOOM, System::Input::KeysAndButtons::KEY_ZOOMIN, System::Input::KeysAndButtons::KEY_ZOOMOUT, System::Input::KeysAndButtons::KEY_ZOOMRESET
Constants included from System::Input::SynchronizationEvents
System::Input::SynchronizationEvents::SYN_CNT, System::Input::SynchronizationEvents::SYN_CONFIG, System::Input::SynchronizationEvents::SYN_DROPPED, System::Input::SynchronizationEvents::SYN_MAX, System::Input::SynchronizationEvents::SYN_MT_REPORT, System::Input::SynchronizationEvents::SYN_REPORT
Constants included from System::Input::EventTypes
System::Input::EventTypes::EV_ABS, System::Input::EventTypes::EV_CNT, System::Input::EventTypes::EV_FF, System::Input::EventTypes::EV_FF_STATUS, System::Input::EventTypes::EV_KEY, System::Input::EventTypes::EV_LED, System::Input::EventTypes::EV_MAX, System::Input::EventTypes::EV_MSC, System::Input::EventTypes::EV_PWR, System::Input::EventTypes::EV_REL, System::Input::EventTypes::EV_REP, System::Input::EventTypes::EV_SND, System::Input::EventTypes::EV_SW, System::Input::EventTypes::EV_SYN
Constants included from System::Input::DeviceProperties
System::Input::DeviceProperties::INPUT_PROP_BUTTONPAD, System::Input::DeviceProperties::INPUT_PROP_CNT, System::Input::DeviceProperties::INPUT_PROP_DIRECT, System::Input::DeviceProperties::INPUT_PROP_MAX, System::Input::DeviceProperties::INPUT_PROP_POINTER, System::Input::DeviceProperties::INPUT_PROP_SEMI_MT
Class Attribute Summary collapse
-
.default_dir ⇒ String
defaults to “/dev/input”.
-
.default_glob ⇒ String
defaults to “/dev/input/event*”.
Class Method Summary collapse
- .all ⇒ Array<Device>
-
.chardev_glob(glob = './*') ⇒ Array<String>
Expands pattern, which is an Array of patterns or a pattern String, and returns the results as matches or as arguments given to the block.
-
.name_grep(name_regexp, filename_glob = nil) ⇒ Array<Device>
executes EVIOCGNAME against known chardev’s, and compares that to the regexp.
-
.new(fd, mode = 'r', opt = {}) ⇒ Object
implement with udev.
-
.open(filename, mode = 'r', opt = {}) ⇒ Object
open(filename, mode=“r” [, opt]) open(filename [, mode [, perm]] [, opt]) {|file| block } → obj /lib/udev/findkeyboards; method_missing -> get_keyboards?.
- .super_open ⇒ Object
Instance Method Summary collapse
- #_bits ⇒ Object
-
#ids ⇒ Array<Fixnum, Fixnum, Fixnum, Fixnum>
gets the ids of this device in an array.
- #led_bits ⇒ Object
-
#name ⇒ String
name of this device.
- #read(length = nil, outbuf = nil) ⇒ Array?
- #read_nonblock(maxlen, out_buf = nil) ⇒ Array?
Methods included from System::Input
Methods included from System::IOCTL
#IOCSIZE_MASK, #IOCSIZE_SHIFT, #IOC_IN, #IOC_INOUT, #IOC_OUT, #_IO, #_IOC, #_IOC_DIR, #_IOC_DIRBITS, #_IOC_DIRMASK, #_IOC_DIRSHIFT, #_IOC_NONE, #_IOC_NR, #_IOC_NRBITS, #_IOC_NRMASK, #_IOC_NRSHIFT, #_IOC_READ, #_IOC_SIZE, #_IOC_SIZEBITS, #_IOC_SIZEMASK, #_IOC_SIZESHIFT, #_IOC_TYPE, #_IOC_TYPEBITS, #_IOC_TYPEMASK, #_IOC_TYPESHIFT, #_IOC_WRITE, #_IOR, #_IOW, #_IOWR, #_size_of, kernel_versions
Methods included from System::Input::Macros
#EVIOCGABS, #EVIOCGBIT, #EVIOCGEFFECTS, #EVIOCGID, #EVIOCGKEY, #EVIOCGKEYCODE, #EVIOCGKEYCODE_V2, #EVIOCGLED, #EVIOCGMTSLOTS, #EVIOCGNAME, #EVIOCGPHYS, #EVIOCGPROP, #EVIOCGRAB, #EVIOCGREP, #EVIOCGSND, #EVIOCGSW, #EVIOCGUNIQ, #EVIOCGVERSION, #EVIOCREVOKE, #EVIOCRMFF, #EVIOCSABS, #EVIOCSCLOCKID, #EVIOCSFF, #EVIOCSKEYCODE, #EVIOCSKEYCODE_V2, #EVIOCSREP, #_s16, #_u16, #_u32, #_u8, #ff_effect, #input_keymap_entry, #int, #struct_input_id, #unsigned_int_2
Methods included from DeviceCapabilities
#absolute_axes?, #forcefeedback?, #forcefeedback_status?, #keys?, #leds?, #misc?, #power?, #relative_axes?, #repeat?, #sound?, #switches?
Class Attribute Details
.default_dir ⇒ String
defaults to “/dev/input”
60 61 62 |
# File 'lib/vigilem/evdev/device.rb', line 60 def default_dir @default_dir ||= '/dev/input' end |
.default_glob ⇒ String
defaults to “/dev/input/event*”
66 67 68 |
# File 'lib/vigilem/evdev/device.rb', line 66 def default_glob @default_glob ||= File.join(default_dir, 'event*') end |
Class Method Details
.all ⇒ Array<Device>
54 55 56 |
# File 'lib/vigilem/evdev/device.rb', line 54 def all @all ||= chardev_glob(default_glob).map {|fp| send(:super_open, fp) } end |
.chardev_glob(glob = './*') ⇒ Array<String>
Expands pattern, which is an Array of patterns or a pattern String, and returns the results as matches or as arguments given to the block. and returns only character devices
97 98 99 |
# File 'lib/vigilem/evdev/device.rb', line 97 def chardev_glob(glob='./*') Dir[glob].select {|f| File::Stat.new(f).chardev? } end |
.name_grep(name_regexp, filename_glob = nil) ⇒ Array<Device>
executes EVIOCGNAME against known chardev’s, and compares that to the regexp. If there is a filename_glob it checks that first.
82 83 84 85 86 87 88 89 |
# File 'lib/vigilem/evdev/device.rb', line 82 def name_grep(name_regexp, filename_glob=nil) if filename_glob file_paths = chardev_glob(filename_glob).map {|fn| File.(fn) } file_paths.map {|f_path| dev if (dev = send(:super_open, f_path)).name =~ name_regexp }.compact.uniq else all.select {|dev| dev.name =~ name_regexp } end end |
.new(fd, mode = 'r', opt = {}) ⇒ Object
implement with udev
34 35 36 |
# File 'lib/vigilem/evdev/device.rb', line 34 def new(fd, mode='r', opt={}) raise NotImplemented, 'Cannot create device yet' end |
.open(filename, mode = 'r', opt = {}) ⇒ Object
mode, opt
open(filename, mode=“r” [, opt]) open(filename [, mode [, perm]] [, opt]) {|file| block } → obj /lib/udev/findkeyboards; method_missing -> get_keyboards?
43 44 45 46 47 48 49 50 |
# File 'lib/vigilem/evdev/device.rb', line 43 def open(filename, mode='r', opt={}) if dev = all.find {|d| File.(filename) == d.path } dev else raise NotImplemented, "mode of #{mode} not supported yet" if mode != 'r' obj_register(super(filename, mode, opt)) end end |
.super_open ⇒ Object
23 |
# File 'lib/vigilem/evdev/device.rb', line 23 alias_method :super_open, :open |
Instance Method Details
#_bits ⇒ Object
136 137 138 139 140 141 142 |
# File 'lib/vigilem/evdev/device.rb', line 136 def _bits unless @bits ioctl(EVIOCGBIT(0), bits = [0].pack('i')) @bits = bits.unpack('i')[0] end return @bits end |
#ids ⇒ Array<Fixnum, Fixnum, Fixnum, Fixnum>
gets the ids of this device in an array
114 115 116 117 118 119 |
# File 'lib/vigilem/evdev/device.rb', line 114 def ids @ids ||= begin ioctl(EVIOCGID, buf = '\x00' * 8) buf.unpack('S!4') end end |
#led_bits ⇒ Object
123 124 125 126 127 128 129 130 131 132 |
# File 'lib/vigilem/evdev/device.rb', line 123 def led_bits no_of_bytes = bit_count_to_byte_count(LED_CNT - 1) ledbit = "\x00" * no_of_bytes ioctl(EVIOCGLED(System.sizeof("C#{no_of_bytes}")), ledbit) ledbit[0..no_of_bytes].unpack("b*").first end |
#name ⇒ String
name of this device
104 105 106 107 108 109 |
# File 'lib/vigilem/evdev/device.rb', line 104 def name @name ||= begin ioctl(EVIOCGNAME(len = 256), out_name = " " * len) out_name.rstrip end end |
#read(length = nil, outbuf = nil) ⇒ Array?
167 168 169 170 171 |
# File 'lib/vigilem/evdev/device.rb', line 167 def read(length=nil, outbuf=nil) length ||= Event.size raise Evdev::SizeError, arg_name: 'length', arg_size: length, max_size: sze if length < (sze = InputEvent.size) super(*[length, outbuf]) end |
#read_nonblock(maxlen, out_buf = nil) ⇒ Array?
158 159 160 161 |
# File 'lib/vigilem/evdev/device.rb', line 158 def read_nonblock(maxlen, out_buf=nil) raise Evdev::SizeError, 'maxlen', maxlen, ie_size if maxlen < (ie_size = InputEvent.size) super(*[maxlen, out_buf]) end |