Class: Browser::Event::Keyboard::Definition

Inherits:
UI::Definition show all
Defined in:
opal/browser/event/keyboard.rb

Instance Method Summary collapse

Methods inherited from UI::Definition

#detail=, #view=

Methods inherited from Definition

#bubbles=, #cancelable=

Instance Method Details

#alt!Object


9
10
11
# File 'opal/browser/event/keyboard.rb', line 9

def alt!
  `#@native.altKey = true`
end

#char=(char) ⇒ Object


33
34
35
# File 'opal/browser/event/keyboard.rb', line 33

def char=(char)
  `#@native.char = #@native.charCode = #{char}`
end

#code=(code) ⇒ Object


25
26
27
# File 'opal/browser/event/keyboard.rb', line 25

def code=(code)
  `#@native.keyCode = #@native.which = #{code}`
end

#ctrl!Object


13
14
15
# File 'opal/browser/event/keyboard.rb', line 13

def ctrl!
  `#@native.ctrlKey = true`
end

#key=(key) ⇒ Object


29
30
31
# File 'opal/browser/event/keyboard.rb', line 29

def key=(key)
  `#@native.key = #{key}`
end

#locale=(value) ⇒ Object


41
42
43
# File 'opal/browser/event/keyboard.rb', line 41

def locale=(value)
  `#@native.locale = value`
end

#meta!Object


17
18
19
# File 'opal/browser/event/keyboard.rb', line 17

def meta!
  `#@native.metaKey = true`
end

#repeat!Object


37
38
39
# File 'opal/browser/event/keyboard.rb', line 37

def repeat!
  `#@native.repeat = true`
end

#shift!Object


21
22
23
# File 'opal/browser/event/keyboard.rb', line 21

def shift!
  `#@native.shiftKey = true`
end