def handle_key(ch)
      return if @list.nil? || @list.empty?
      @current_index ||= 0
      @toprow ||= 0
      h = scrollatrow()
      rc = row_count
      $log.debug " tree got ch #{ch}"
      case ch
      when 27, ?\C-c.getbyte(0)
        #editing_canceled @current_index if @cell_editing_allowed
        #cancel_block # block
        $multiplier = 0
        return 0
      #when ?\C-u.getbyte(0)
        # multiplier. Series is 4 16 64
        # TESTING @multiplier = (@multiplier == 0 ? 4 : @multiplier *= 4)
      #  return 0
      when ?\C-c.getbyte(0)
        @multiplier = 0
        return 0
      else
        ret = :UNHANDLED 
        if ret == :UNHANDLED
          # beware one-key eats up numbers. we'll be wondering why
          if @one_key_selection
            case ch
            #when ?A.getbyte(0)..?Z.getbyte(0), ?a.getbyte(0)..?z.getbyte(0), ?0.getbyte(0)..?9.getbyte(0)
            when ?A.getbyte(0)..?Z.getbyte(0), ?a.getbyte(0)..?z.getbyte(0)
              # simple motion, key press defines motion
              ret = set_selection_for_char ch.chr
            else
              ret = process_key ch, self
              @multiplier = 0
              return :UNHANDLED if ret == :UNHANDLED
            end
          else
            # no motion on single key, we can freak out like in vim, pref f <char> for set_selection
            case ch
            when ?0.getbyte(0)..?9.getbyte(0)
              $multiplier *= 10 ; $multiplier += (ch-48)
              #$log.debug " setting mult to #{$multiplier} in list "
              return 0
            end
            $log.debug " TREE before process key #{ch} "
            ret = process_key ch, self
            $log.debug " TREE after process key #{ch} #{ret} "
            #$multiplier = 0 # 2010-09-02 22:35 this prevents parent from using mult
            return :UNHANDLED if ret == :UNHANDLED
          end
        end
      end
      $multiplier = 0
    end
def handle_key(ch)
      return if @list.nil? || @list.empty?
      @current_index ||= 0
      @toprow ||= 0
      h = scrollatrow()
      rc = row_count
      $log.debug " tree got ch #{ch}"
      case ch
      when 27, ?\C-c.getbyte(0)
        #editing_canceled @current_index if @cell_editing_allowed
        #cancel_block # block
        $multiplier = 0
        return 0
      #when ?\C-u.getbyte(0)
        # multiplier. Series is 4 16 64
        # TESTING @multiplier = (@multiplier == 0 ? 4 : @multiplier *= 4)
      #  return 0
      when ?\C-c.getbyte(0)
        @multiplier = 0
        return 0
      else
        ret = :UNHANDLED 
        if ret == :UNHANDLED
          # beware one-key eats up numbers. we'll be wondering why
          if @one_key_selection
            case ch
            #when ?A.getbyte(0)..?Z.getbyte(0), ?a.getbyte(0)..?z.getbyte(0), ?0.getbyte(0)..?9.getbyte(0)
            when ?A.getbyte(0)..?Z.getbyte(0), ?a.getbyte(0)..?z.getbyte(0)
              # simple motion, key press defines motion
              ret = set_selection_for_char ch.chr
            else
              ret = process_key ch, self
              @multiplier = 0
              return :UNHANDLED if ret == :UNHANDLED
            end
          else
            # no motion on single key, we can freak out like in vim, pref f <char> for set_selection
            case ch
            when ?0.getbyte(0)..?9.getbyte(0)
              $multiplier *= 10 ; $multiplier += (ch-48)
              #$log.debug " setting mult to #{$multiplier} in list "
              return 0
            end
            $log.debug " TREE before process key #{ch} "
            ret = process_key ch, self
            $log.debug " TREE after process key #{ch} #{ret} "
            #$multiplier = 0 # 2010-09-02 22:35 this prevents parent from using mult
            return :UNHANDLED if ret == :UNHANDLED
          end
        end
      end
      $multiplier = 0
    end
Listbox