Module: Cryptum::Event::KeyPress
- Defined in:
- lib/cryptum/event/key_press.rb
Overview
This Module is used to Detect when Keys are Pressed on the Keyboard
Class Method Summary collapse
-
.detect(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::KeyPress.detect( ).
-
.help ⇒ Object
Display Usage for this Module.
Class Method Details
.detect(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::KeyPress.detect( )
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cryptum/event/key_press.rb', line 11 public_class_method def self.detect(opts = {}) terminal_win = opts[:terminal_win] Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.ticker_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.portfolio_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.order_plan_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.order_timer_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.market_trend_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.signal_engine_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.order_execute_section ) Cryptum::UI.detect_key_press_in_ui( key_press_event: terminal_win.key_press_event, ui_win: terminal_win.command_section ) rescue Interrupt, StandardError => e Cryptum::Log.append(level: :error, msg: e, which_self: self) end |
.help ⇒ Object
Display Usage for this Module
58 59 60 61 62 |
# File 'lib/cryptum/event/key_press.rb', line 58 public_class_method def self.help puts "USAGE: order_book = #{self}.crypto() " end |