class Reline::KeyStroke
def match_status(input)
def match_status(input) key_mapping.keys.select { |lhs| start_with?(lhs, input) }.tap { |it| return :matched if it.size == 1 && equal?(it[0], input) return :matching if it.size == 1 && !equal?(it[0], input) return :matched if it.max_by(&:size)&.size&.< input.size return :matching if it.size > 1 } key_mapping.keys.select { |lhs| start_with?(input, lhs) }.tap { |it| return it.size > 0 ? :matched : :unmatched } end