def rb_getchar(prompt, config={}) # yield field
      begin
        win = __create_footer_window
        #form = Form.new win
        r = 0; c = 1;
        default = config[:default] 
        prompt = "#{prompt} [#{default}] " if default
        win.mvprintw(r, c, "%s: " % prompt);
        bg = Ncurses.COLORS >= 236 ? 236 : :blue
        color_pair = get_color($reversecolor, :white, bg)
        win.printstring r, c + prompt.size + 2, " ", color_pair

        win.wrefresh
        prevchar = 0
        entries = nil
        while ((ch = win.getchar()) != 999)
          return default.ord if default && (ch == 13 || ch == KEY_ENTER)
          return nil if ch == ?\C-c.getbyte(0) || ch == ?\C-g.getbyte(0)
          if ch == KEY_F1
            help_text = config[:help_text] || "No help provided. C-c/C-g aborts."
            print_status_message help_text, :wait => 7
            win.wrefresh # nevr had to do this with ncurses, but have to with ffi-ncurses ??
            next
          end
          if config[:regexp]
            reg = config[:regexp]
            if ch > 0 && ch < 256
              chs = ch.chr
              return ch if chs =~ reg
              alert "Wrong character. #{reg} "
            else
              alert "Wrong character. #{reg} "
            end
          else
            return ch
          end
          #form.handle_key ch
          win.wrefresh
        end
      rescue => err
        Ncurses.beep
        $log.error "EXC in rb_getstr #{err} "
        $log.error(err.backtrace.join("\n")) 
      ensure
        win.destroy if win
      end
      return nil
    end
def rb_getchar(prompt, config={}) # yield field
      begin
        win = __create_footer_window
        #form = Form.new win
        r = 0; c = 1;
        default = config[:default] 
        prompt = "#{prompt} [#{default}] " if default
        win.mvprintw(r, c, "%s: " % prompt);
        bg = Ncurses.COLORS >= 236 ? 236 : :blue
        color_pair = get_color($reversecolor, :white, bg)
        win.printstring r, c + prompt.size + 2, " ", color_pair

        win.wrefresh
        prevchar = 0
        entries = nil
        while ((ch = win.getchar()) != 999)
          return default.ord if default && (ch == 13 || ch == KEY_ENTER)
          return nil if ch == ?\C-c.getbyte(0) || ch == ?\C-g.getbyte(0)
          if ch == KEY_F1
            help_text = config[:help_text] || "No help provided. C-c/C-g aborts."
            print_status_message help_text, :wait => 7
            win.wrefresh # nevr had to do this with ncurses, but have to with ffi-ncurses ??
            next
          end
          if config[:regexp]
            reg = config[:regexp]
            if ch > 0 && ch < 256
              chs = ch.chr
              return ch if chs =~ reg
              alert "Wrong character. #{reg} "
            else
              alert "Wrong character. #{reg} "
            end
          else
            return ch
          end
          #form.handle_key ch
          win.wrefresh
        end
      rescue => err
        Ncurses.beep
        $log.error "EXC in rb_getstr #{err} "
        $log.error(err.backtrace.join("\n")) 
      ensure
        win.destroy if win
      end
      return nil
    end
get a character.
 unlike rb_gets allows user to enter control or alt or function character too.
 @param [String] prompt or label to show.
 @param [Hash] configuration such as default or regexp for validation
 @return [Integer] nil if canceled, or ret value of getchar which is numeric
 If default provided, then ENTER returns the default