def handle_key ch
      @current_key = ch # I need some funcs to know what key they were mapped to
      @buffer = @list[@current_index]
      if @buffer.nil? and @list.length == 0
        ## 2009-10-04 22:39 
        # what this newline does is , if we use << to append, data is appended
        # to second line
        @list << "\n" # changed space to newline so wrapping puts a line.
        @current_index = 0 ; ## added 2009-10-04 21:47 
        @buffer = @list[@current_index]
      end
      ## 2009-10-04 20:48  i think the next line was resulting in a hang if buffer nil
      # in sqlc on pressing Clear.
      # if buffer is nil and user wants to enter something -- added UNHANDLED
      return :UNHANDLED if @buffer.nil?
      #$log.debug "TA: before: curpos #{@curpos} blen: #{@buffer.length}"
      # on any line if the cursor is ahead of buffer length, ensure its on last position
      # what if the buffer is somehow gt maxlen ??
      if @curpos > @buffer.length
        addcol(@buffer.length-@curpos)+1
        @curpos = @buffer.length
      end
      #$log.debug "TA: after : curpos #{@curpos} blen: #{@buffer.length}, w: #{@width} max #{@maxlen}"
      
      #NOTE C-d being used for del what of scroll !!
      case ch
      when KEY_ENTER, KEY_RETURN, FFI::NCurses::KEY_ENTER # numeric enter
        insert_break
      #when ?\C-u.getbyte(0)
        ## since textareas are editable we use a control key to increase
        ## multiplier. Series is 4 16 64
        #@multiplier = (@multiplier == 0 ? 4 : @multiplier *= 4)
        #return 0
      else
        #$log.debug(" textarea ch #{ch}")
        ret = putc ch
        if ret == :UNHANDLED
          # check for bindings, these cannot override above keys since placed at end
          ret = process_key ch, self
          #$log.debug "TA process_key #{ch} got ret #{ret} in #{@name} "
          return :UNHANDLED if ret == :UNHANDLED
        end
      end
      set_form_row
      set_form_col  # testing 2008-12-26 19:37 
      $multiplier = 0 # reset only if key handled
      return 0
    end
def handle_key ch
      @current_key = ch # I need some funcs to know what key they were mapped to
      @buffer = @list[@current_index]
      if @buffer.nil? and @list.length == 0
        ## 2009-10-04 22:39 
        # what this newline does is , if we use << to append, data is appended
        # to second line
        @list << "\n" # changed space to newline so wrapping puts a line.
        @current_index = 0 ; ## added 2009-10-04 21:47 
        @buffer = @list[@current_index]
      end
      ## 2009-10-04 20:48  i think the next line was resulting in a hang if buffer nil
      # in sqlc on pressing Clear.
      # if buffer is nil and user wants to enter something -- added UNHANDLED
      return :UNHANDLED if @buffer.nil?
      #$log.debug "TA: before: curpos #{@curpos} blen: #{@buffer.length}"
      # on any line if the cursor is ahead of buffer length, ensure its on last position
      # what if the buffer is somehow gt maxlen ??
      if @curpos > @buffer.length
        addcol(@buffer.length-@curpos)+1
        @curpos = @buffer.length
      end
      #$log.debug "TA: after : curpos #{@curpos} blen: #{@buffer.length}, w: #{@width} max #{@maxlen}"
      
      #NOTE C-d being used for del what of scroll !!
      case ch
      when KEY_ENTER, KEY_RETURN, FFI::NCurses::KEY_ENTER # numeric enter
        insert_break
      #when ?\C-u.getbyte(0)
        ## since textareas are editable we use a control key to increase
        ## multiplier. Series is 4 16 64
        #@multiplier = (@multiplier == 0 ? 4 : @multiplier *= 4)
        #return 0
      else
        #$log.debug(" textarea ch #{ch}")
        ret = putc ch
        if ret == :UNHANDLED
          # check for bindings, these cannot override above keys since placed at end
          ret = process_key ch, self
          #$log.debug "TA process_key #{ch} got ret #{ret} in #{@name} "
          return :UNHANDLED if ret == :UNHANDLED
        end
      end
      set_form_row
      set_form_col  # testing 2008-12-26 19:37 
      $multiplier = 0 # reset only if key handled
      return 0
    end
textarea