class RubyHid::Button

Button objects are observers of buttons on a controller. Buttons which are currently available are listed, by name in the EVENTS constant.

Buttons can have 2 values passed to each event:

To set the actions for a button use add_event:

button = Button.find_by_name(:btn_1)
button.add_event(lambda{ |value| puts "Button 1: #{value}" })

Constants

EVENTS

List of button types, with names

Public Instance Methods

to_s() click to toggle source

Quick summary of the button

# File lib/ruby_hid/button.rb, line 43
def to_s
  "Button: #{code} - #{name}"
end