Class: Puppeteer::Keyboard::KeyDefinition
- Inherits:
-
Object
- Object
- Puppeteer::Keyboard::KeyDefinition
- Defined in:
- lib/puppeteer/keyboard/us_keyboard_layout.rb
Overview
-
@typedef Object KeyDefinition
-
@property number= keyCode
-
@property number= shiftKeyCode
-
@property string= key
-
@property string= shiftKey
-
@property string= code
-
@property string= text
-
@property string= shiftText
-
@property number= location
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#key_code ⇒ Object
readonly
Returns the value of attribute key_code.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#shift_key ⇒ Object
readonly
Returns the value of attribute shift_key.
-
#shift_key_code ⇒ Object
readonly
Returns the value of attribute shift_key_code.
-
#shift_text ⇒ Object
readonly
Returns the value of attribute shift_text.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(hash) ⇒ KeyDefinition
constructor
A new instance of KeyDefinition.
Constructor Details
#initialize(hash) ⇒ KeyDefinition
Returns a new instance of KeyDefinition.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 12 def initialize(hash) @key_code = hash[:keyCode] @shift_key_code = hash[:shiftKeyCode] @key = hash[:key] @shift_key = hash[:shiftKey] @code = hash[:code] @text = hash[:text] @shift_text = hash[:shiftText] @location = hash[:location] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def code @code end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def key @key end |
#key_code ⇒ Object (readonly)
Returns the value of attribute key_code.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def key_code @key_code end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def location @location end |
#shift_key ⇒ Object (readonly)
Returns the value of attribute shift_key.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def shift_key @shift_key end |
#shift_key_code ⇒ Object (readonly)
Returns the value of attribute shift_key_code.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def shift_key_code @shift_key_code end |
#shift_text ⇒ Object (readonly)
Returns the value of attribute shift_text.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def shift_text @shift_text end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
23 24 25 |
# File 'lib/puppeteer/keyboard/us_keyboard_layout.rb', line 23 def text @text end |