Sha256: 1afb04ffc298948d96ae5defa496a201b5870c204dad8ae864f2a3de3884a984

Contents?: true

Size: 892 Bytes

Versions: 101

Compression:

Stored size: 892 Bytes

Contents

# frozen_string_literal: true

module Cryptum
  module UI
    # This Class is Used to Detect Key Press Events
    class KeyPressEvent
      attr_accessor :key_c,
                    :key_g,
                    :key_r,
                    :key_u,
                    :key_w,
                    :key_x,
                    :key_ansi,
                    :key_down_arrow,
                    :key_end,
                    :key_enter,
                    :key_esc,
                    :key_home,
                    :key_page_down,
                    :key_page_up,
                    :key_tab,
                    :key_up_arrow

    rescue Interrupt
      # Exit Gracefully if CTRL+C is Pressed During Session
      Cryptum.exit_gracefully(which_self: self)
    rescue StandardError => e
      # Produce a Stacktrace for anything else
      Curses.close_screen
      raise e
    end
  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
cryptum-0.0.346 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.345 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.344 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.343 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.342 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.341 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.339 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.338 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.337 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.336 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.335 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.334 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.333 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.332 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.331 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.330 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.329 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.328 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.327 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.326 lib/cryptum/ui/key_press_event.rb