Method: Event#ctrl?

Defined in:
lib/source/redshift/event.rb

#ctrl?Boolean

call-seq:

evnt.ctrl? -> true or false

Returns true if the control key was depressed during the event, false otherwise.

Document['#example'].listen(:click) {|element, event| puts "ctrl-clicked" if event.ctrl? }

ctrl-clicking element ‘#example’ produces:

ctrl-clicked

Returns:

  • (Boolean)


150
151
152
# File 'lib/source/redshift/event.rb', line 150

def ctrl?
  `this.__ctrl__`
end