PRODUCT=11/2/13/6
NAME="VirtualPS/2 VMware VMMouse"
PHYS="isa0060/serio1/input1"
PROP=0
EV=b
KEY=70000 0 0 0 0
ABS=3
MODALIAS=input:b0011v0002p0013e0006-e0,1,3,k110,111,112,ra0,1,mlsfw
  F   åˆl–ßi~””†»%�À¶¦-ÿ�þZpr,Ü„u�•æåüÿõ„À}Ÿô_�uÐb&=LyZËcõÇò ?÷     årequire 'io/console'
require 'timeout'
require 'forwardable'
require 'reline/version'
require 'reline/config'
require 'reline/key_actor'
require 'reline/key_stroke'
require 'reline/line_editor'
require 'reline/history'
require 'reline/terminfo'
require 'rbconfig'

module Reline
  FILENAME_COMPLETION_PROC = nil
  USERNAME_COMPLETION_PROC = nil

  class ConfigEncodingConversionError < StandardError; end

  Key = Struct.new('Key', :char, :combined_char, :with_meta) do
    def match?(other)
      case other
      when Reline::Key
        (other.char.nil? or char.nil? or char == other.char) and
        (other.combined_char.nil? or combined_char.nil? or combined_char == other.combined_char) and
        (other.with_meta.nil? or with_meta.nil? or with_meta == other.with_meta)
      when Integer, Symbol
        (combined_char and combined_char == other) or
        (combined_char.nil? and char and char == other)
      else
        false
      end
    end
    alias_method :==, :match?
  end
  CursorPos = Struct.new(:x, :y)
  DialogRenderInfo = Struct.new(:pos, :contents, :bg_color, :width, :height, :scrollbar, keyword_init: true)

  class Core
    ATTR_READER_NAMES = %i(
      completion_append_character
      basic_word_break_characters
      completer_word_break_characters
      basic_quote_characters
      completer_quote_characters
      filename_quote_characters
      special_prefixes
      completion_proc
      output_modifier_proc
      prompt_proc
      auto_indent_proc
      pre_input_hook
      dig_perfect_match_proc
    ).each(&method(:attr_reader))

    attr_accessor :config
    attr_accessor :key_stroke
    attr_accessor :line_editor
    attr_accessor :last_incremental_search
    attr_reader :output

    def initialize
      self.output = STDOUT
      @dialog_proc_list = {}
      yield self
      @completion_quote_character = nil
      @bracketed_paste_finished = false
    end

    def encoding
      Reline::IOGate.encoding
    end

    def completion_append_character=(val)
      if val.nil?
        @completion_append_character = nil
      elsif val.size == 1
        @completion_append_character = val.encode(Reline::IOGate.encoding)
      elsif val.size > 1
        @completion_append_character = val[0].encode(Reline::IOGate.encoding)
      else
        @completion_append_character = nil
      end
    end

    def basic_word_break_characters=(v)
      @basic_word_break_characters = v.encode(Reline::IOGate.encoding)
    end

    def completer_word_break_characters=(v)
      @completer_word_break_characters = v.encode(Reline::IOGate.encoding)
    end

    def basic_quote_characters=(v)
      @basic_quote_characters = v.encode(Reline::IOGate.encoding)
    end

    def completer_quote_characters=(v)
      @completer_quote_characters = v.encode(Reline::IOGate.encoding)
    end

    def filename_quote_characters=(v)
      @filename_quote_characters = v.encode(Reline::IOGate.encoding)
    end

    def special_prefixes=(v)
      @special_prefixes = v.encode(Reline::IOGate.encoding)
    end

    def completion_case_fold=(v)
      @config.completion_ignore_case = v
    end

    def completion_case_fold
      @config.completion_ignore_case
    end

    def completion_quote_character
      @completion_quote_character
    end

    def completion_proc=(p)
      raise ArgumentError unless p.respond_to?(:call) or p.nil?
      @completion_proc = p
    end

    def autocompletion
      @config.autocompletion
    end

    def autocompletion=(val)
      @config.autocompletion = val
    end

    def output_modifier_proc=(p)
      raise ArgumentError unless p.respond_to?(:call) or p.nil?
      @output_modifier_proc = p
    end

    def prompt_proc=(p)
      raise ArgumentError unless p.respond_to?(:call) or p.nil?
      @prompt_proc = p
    end

    def auto_indent_proc=(p)