class Reline::KeyStroke

def equal?(me, other)

def equal?(me, other)
  case me
  when Array
    compressed_me = compress_meta_key(me)
    compressed_other = compress_meta_key(other)
    compressed_me.size == compressed_other.size and [compressed_me, compressed_other].transpose.all?{ |i| equal?(i[0], i[1]) }
  when Integer
    if other.is_a?(Reline::Key)
      if other.combined_char == "\e".ord
        false
      else
        other.combined_char == me
      end
    else
      me == other
    end
  when Reline::Key
    if other.is_a?(Integer)
      me.combined_char == other
    else
      me == other
    end
  end
end