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.370 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.369 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.368 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.367 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.366 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.365 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.364 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.363 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.362 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.361 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.360 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.355 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.354 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.353 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.352 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.351 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.350 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.349 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.348 lib/cryptum/ui/key_press_event.rb
cryptum-0.0.347 lib/cryptum/ui/key_press_event.rb