Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-jquery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f5332667d436
Choose a base ref
...
head repository: opal/opal-jquery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1ca523db7dcf
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 4, 2015

  1. Add missing event key modifiers

    We already had `ctrl_key`, but modifiers for Alt, Shift, and Meta were
    missing.
    jgaskins committed Jan 4, 2015
    Copy the full SHA
    854dfe4 View commit details
  2. Merge pull request #65 from jgaskins/event-key-modifiers

    Add missing event key modifiers
    elia committed Jan 4, 2015
    Copy the full SHA
    1ca523d View commit details
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/opal/jquery/event.rb
12 changes: 12 additions & 0 deletions lib/opal/jquery/event.rb
Original file line number Diff line number Diff line change
@@ -175,6 +175,18 @@ def ctrl_key
`#@native.ctrlKey`
end

def meta_key
`#@native.metaKey`
end

def alt_key
`#@native.altKey`
end

def shift_key
`#@native.shiftKey`
end

def key_code
`#@native.keyCode`
end