Class: Rbindkeys::Device
- Inherits:
-
Revdev::EventDevice
- Object
- Revdev::EventDevice
- Rbindkeys::Device
- Defined in:
- lib/rbindkeys/device.rb
Instance Method Summary collapse
Instance Method Details
#release_all_key ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rbindkeys/device.rb', line 9 def release_all_key ie = Revdev::InputEvent.new nil, 0, 0, 0 Revdev.constants.select{|c| c.match(/^(?:KEY|BTN)/)}.each do |c| ie.type = Revdev::EV_KEY ie.code = Revdev.const_get c ie.value = 0 write_input_event ie ie.type = Revdev::EV_SYN ie.code = 0 write_input_event ie end end |