def handle_key ch
      $log.debug "  HANDLER GOT KEY #{ch} "
      @keyint = ch
      @keychr = nil
      # accumulate keys in a string
      # need to track insertion point if user uses left and right arrow
        @buffer ||= ""
        chr = nil
        chr = ch.chr if ch > 47 and ch < 127
        @keychr = chr
        # Don't let user hit enter or keys if no match
        if [13,10, KEY_ENTER, KEY_UP, KEY_DOWN].include? ch
          if @no_match
            $log.warn "XXX:  KEY GOT WAS #{ch},  #{chr} "
            # viewer has already blocked KEY_ENTER !
            return 0 if [13,10, KEY_ENTER, KEY_UP, KEY_DOWN].include? ch
          else
            if [13,10, KEY_ENTER].include? ch
              @source.form.window.ungetch(1001)
              return 0
            end
          end
        end
        ret = process_key ch
        # revert to the basic handling of key_map and refreshing pad.
        # but this will rerun the keys and may once again run a mapping.
        @source._handle_key(ch) if ret == :UNHANDLED
    end
def handle_key ch
      $log.debug "  HANDLER GOT KEY #{ch} "
      @keyint = ch
      @keychr = nil
      # accumulate keys in a string
      # need to track insertion point if user uses left and right arrow
        @buffer ||= ""
        chr = nil
        chr = ch.chr if ch > 47 and ch < 127
        @keychr = chr
        # Don't let user hit enter or keys if no match
        if [13,10, KEY_ENTER, KEY_UP, KEY_DOWN].include? ch
          if @no_match
            $log.warn "XXX:  KEY GOT WAS #{ch},  #{chr} "
            # viewer has already blocked KEY_ENTER !
            return 0 if [13,10, KEY_ENTER, KEY_UP, KEY_DOWN].include? ch
          else
            if [13,10, KEY_ENTER].include? ch
              @source.form.window.ungetch(1001)
              return 0
            end
          end
        end
        ret = process_key ch
        # revert to the basic handling of key_map and refreshing pad.
        # but this will rerun the keys and may once again run a mapping.
        @source._handle_key(ch) if ret == :UNHANDLED
    end
key handler of Controlphandler which overrides KeyDispatcher since we need to
 intercept KEY_ENTER
 @param [Integer] ch is key read by window.
 WARNING: Please note that if this is used in +Viewer.view+, that +view+
 has already trapped CLOSE_KEY which is KEY_ENTER/13 for closing, so we won't get 13
 anywhere