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

Instance Method Details

#absolute_axes?Boolean

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (Boolean)


36
37
38
# File 'lib/vigilem/evdev/device_capabilities.rb', line 36

def repeat?
  ((_bits >> System::Input::EV_REP) & 1) == 1
end

#sound?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/vigilem/evdev/device_capabilities.rb', line 16

def sound?
  ((_bits >> System::Input::EV_SND) & 1) == 1
end

#switches?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/vigilem/evdev/device_capabilities.rb', line 32

def switches?
  ((_bits >> System::Input::EV_SW) & 1) == 1
end