Module: Vigilem::Evdev::DeviceCapabilities
- Included in:
- Device
- Defined in:
- lib/vigilem/evdev/device_capabilities.rb
Overview
/sys/class/input/event1/device/capabilities
Instance Method Summary collapse
- #absolute_axes? ⇒ Boolean
- #forcefeedback? ⇒ Boolean
- #forcefeedback_status? ⇒ Boolean
- #keys?(fd) ⇒ Boolean
- #leds? ⇒ Boolean
- #misc? ⇒ Boolean
- #power? ⇒ Boolean
- #relative_axes? ⇒ Boolean
- #repeat? ⇒ Boolean
- #sound? ⇒ Boolean
- #switches? ⇒ Boolean
Instance Method Details
#absolute_axes? ⇒ Boolean
24 25 26 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 24 def absolute_axes? ((_bits >> System::Input::EV_ABS) & 1) == 1 end |
#forcefeedback? ⇒ Boolean
40 41 42 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 40 def forcefeedback? ((_bits >> System::Input::EV_FF) & 1) == 1 end |
#forcefeedback_status? ⇒ Boolean
44 45 46 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 44 def forcefeedback_status? ((_bits >> System::Input::EV_FF_STATUS) & 1) == 1 end |
#keys?(fd) ⇒ Boolean
8 9 10 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 8 def keys?(fd) ((_bits >> System::Input::EV_KEY) & 1) == 1 end |
#leds? ⇒ Boolean
12 13 14 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 12 def leds? ((_bits >> System::Input::EV_LED) & 1) == 1 end |
#misc? ⇒ Boolean
28 29 30 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 28 def misc? ((_bits >> System::Input::EV_MSC) & 1) == 1 end |
#power? ⇒ Boolean
48 49 50 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 48 def power? ((_bits >> System::Input::EV_PWR) & 1) == 1 end |
#relative_axes? ⇒ Boolean
20 21 22 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 20 def relative_axes? ((_bits >> System::Input::EV_REL) & 1) == 1 end |
#repeat? ⇒ Boolean
36 37 38 |
# File 'lib/vigilem/evdev/device_capabilities.rb', line 36 def repeat? ((_bits >> System::Input::EV_REP) & 1) == 1 end |