lib/cryptum/ui.rb in cryptum-0.0.398 vs lib/cryptum/ui.rb in cryptum-0.0.399

- old
+ new

@@ -247,16 +247,13 @@ ui_win = opts[:ui_win] key_press = ui_win.get_char # Useful for detecting and logging actual key presses to file - # unless key_press.nil? - # File.open('/tmp/detect_key_press_in_ui-cryptum.txt', 'a') do |f| - # f.puts key_press.class - # f.print key_press.inspect - # f.puts "\n\n\n" - # end + # if key_press + # debug_keys = "#{key_press.class} => key_press.inspect\n\n\n" + # Cryptum::Log.append(level: :debug, msg: debug_keys, which_self: self) # end case key_press when 'C' key_press_event.key_c = true @@ -276,9 +273,10 @@ key_press_event.key_enter = true when "\t" key_press_event.key_tab = true end + # TODO: Fix this - sometimes this results in unintended behavior. # What a hack to detect special keys (-.-) if key_press_event.key_esc key_press_event.key_ansi = true if key_press == '[' if key_press_event.key_ansi key_press_event.key_up_arrow = true if key_press == 'A'