read_char

in lib/app/menu.rb [67:89]


    def read_char
      STDIN.echo = false
      STDIN.raw!

      input = STDIN.getc
      if input == "\e"
        begin
          input << STDIN.read_nonblock(3)
        rescue StandardError
          nil
        end
        begin
          input << STDIN.read_nonblock(2)
        rescue StandardError
          nil
        end
      end
      input
    ensure
      STDIN.echo = true
      STDIN.cooked!
    end