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


11
12
13
# File 'opal/browser/event/keyboard.rb', line 11

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

#char=(char) ⇒ Object


35
36
37
# File 'opal/browser/event/keyboard.rb', line 35

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

#code=(code) ⇒ Object


27
28
29
# File 'opal/browser/event/keyboard.rb', line 27

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

#ctrl!Object


15
16
17
# File 'opal/browser/event/keyboard.rb', line 15

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

#key=(key) ⇒ Object


31
32
33
# File 'opal/browser/event/keyboard.rb', line 31

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

#locale=(value) ⇒ Object


43
44
45
# File 'opal/browser/event/keyboard.rb', line 43

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

#meta!Object


19
20
21
# File 'opal/browser/event/keyboard.rb', line 19

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

#repeat!Object


39
40
41
# File 'opal/browser/event/keyboard.rb', line 39

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

#shift!Object


23
24
25
# File 'opal/browser/event/keyboard.rb', line 23

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