 {Disposable, CompositeDisposable} = require 'event-kit'
 {specificity} = require 'clear-cut'
 _ = require 'underscore-plus'
+{$} = require './space-pen-extensions'
 
 SequenceCount = 0
 SpecificityCache = {}


  findCommands: ({target}) ->
    commands = []
    currentTarget = target
    loop
      for commandName, listeners of @listenersByCommandName


      break if currentTarget is @rootNode
      currentTarget = currentTarget.parentNode

    for name, displayName of $(target).events() when displayName
      commands.push({name, displayName, jQuery: true})

    for name, displayName of $(window).events() when displayName
      commands.push({name, displayName, jQuery: true})

    commands

