     keydown keys, {element}
   else
     for key in keys.split('')
-      if key.match(/[A-Z]/)
-        keydown key, {shift: true, element}
-      else
-        keydown key, {element}
+      event = {element}
+      event.shift = true if key.match(/[A-Z]/)
+      keydown key, event
 
 toArray = (obj, cond=null) ->
   if _.isArray(cond ? obj) then obj else [obj]

# Refactoring status: 70%
_ = require 'underscore-plus'
{Range, Point} = require 'atom'

supportedModeClass = [
  'normal-mode'

      shouldNotContainClasses = _.difference(supportedModeClass, currentMode)
      for m in shouldNotContainClasses
        expect(@editorElement.classList.contains(m)).toBe(false)

  keystroke: (keys, {element}={}) =>
    # keys must be String or Array
