module Lebowski::Foundation::Mixins::KeyCheck

Public Instance Methods

key_down?(key) click to toggle source

Check if a key is pressed down. Note that the key is not specific to any object. So the following scenario is valid:

objA.key_down? 'a' # => false
objB.key_down 'a'
objA.key_down? 'a' # => true
# File lib/lebowski/foundation/mixins/key_check.rb, line 20
def key_down?(key)
  return @driver.key_down? key
end
key_up?(key) click to toggle source

Check if a key is pressed down. Note that the key is not specific to any object. So the following scenario is valid:

objA.key_up? 'a' # => true
objB.key_down 'a'
objA.key_up? 'a' # => false
# File lib/lebowski/foundation/mixins/key_check.rb, line 32
def key_up?(key)
  return @driver.key_up? key
end