def ORIG_process_key keycode, object, window
        return :UNHANDLED if @_key_map.nil?
        blk = @_key_map[keycode]
        $log.debug "XXX:  _process key keycode #{keycode} #{blk.class}, #{self.class} "
        return :UNHANDLED if blk.nil?
        if blk.is_a? OrderedHash 
          #Ncurses::nodelay(window.get_window, bf = false)
          # if you set nodelay in ncurses.rb then this will not
          # wait for second key press, so you then must either make it blocking
          # here, or set a wtimeout here.
          #
          # This is since i have removed timeout globally since resize was happeing
          # after a keypress. maybe we can revert to timeout and not worry about resize so much
          Ncurses::wtimeout(window.get_window, 500) # will wait a second on wgetch so we can get gg and qq
          ch = window.getch
          # we should not reset here, resetting should happen in getch itself so it is consistent
          #Ncurses::nowtimeout(window.get_window, true)

          $log.debug " process_key: got #{keycode} , #{ch} "
          # next line ignores function keys etc. C-x F1, thus commented 255 2012-01-11 
          if ch < 0 #|| ch > 255
            return nil
          end
          #yn = ch.chr
          blk1 = blk[ch]
          # FIXME we are only returning the second key, what if form
          # has mapped first and second combo. We should unget keycode and ch. 2011-12-23 
          # check this out first.
          window.ungetch(ch) if blk1.nil? # trying  2011-09-27 
          return :UNHANDLED if blk1.nil? # changed nil to unhandled 2011-09-27 
          $log.debug " process_key: found block for #{keycode} , #{ch} "
          blk = blk1
        end
        if blk.is_a? Symbol
          if respond_to? blk
            return send(blk, *@_key_args[keycode])
          else
            ## 2013-03-05 - 19:50 why the hell is there an alert here, nowhere else
            alert "This ( #{self.class} ) does not respond to #{blk.to_s} [PROCESS-KEY]"
            # added 2013-03-05 - 19:50 so called can know
            return :UNHANDLED 
          end
        else
          $log.debug "rwidget BLOCK called _process_key " if $log.debug? 
          return blk.call object,  *@_key_args[keycode]
        end
        #0
      end
def ORIG_process_key keycode, object, window
        return :UNHANDLED if @_key_map.nil?
        blk = @_key_map[keycode]
        $log.debug "XXX:  _process key keycode #{keycode} #{blk.class}, #{self.class} "
        return :UNHANDLED if blk.nil?
        if blk.is_a? OrderedHash 
          #Ncurses::nodelay(window.get_window, bf = false)
          # if you set nodelay in ncurses.rb then this will not
          # wait for second key press, so you then must either make it blocking
          # here, or set a wtimeout here.
          #
          # This is since i have removed timeout globally since resize was happeing
          # after a keypress. maybe we can revert to timeout and not worry about resize so much
          Ncurses::wtimeout(window.get_window, 500) # will wait a second on wgetch so we can get gg and qq
          ch = window.getch
          # we should not reset here, resetting should happen in getch itself so it is consistent
          #Ncurses::nowtimeout(window.get_window, true)

          $log.debug " process_key: got #{keycode} , #{ch} "
          # next line ignores function keys etc. C-x F1, thus commented 255 2012-01-11 
          if ch < 0 #|| ch > 255
            return nil
          end
          #yn = ch.chr
          blk1 = blk[ch]
          # FIXME we are only returning the second key, what if form
          # has mapped first and second combo. We should unget keycode and ch. 2011-12-23 
          # check this out first.
          window.ungetch(ch) if blk1.nil? # trying  2011-09-27 
          return :UNHANDLED if blk1.nil? # changed nil to unhandled 2011-09-27 
          $log.debug " process_key: found block for #{keycode} , #{ch} "
          blk = blk1
        end
        if blk.is_a? Symbol
          if respond_to? blk
            return send(blk, *@_key_args[keycode])
          else
            ## 2013-03-05 - 19:50 why the hell is there an alert here, nowhere else
            alert "This ( #{self.class} ) does not respond to #{blk.to_s} [PROCESS-KEY]"
            # added 2013-03-05 - 19:50 so called can know
            return :UNHANDLED 
          end
        else
          $log.debug "rwidget BLOCK called _process_key " if $log.debug? 
          return blk.call object,  *@_key_args[keycode]
        end
        #0
      end
e.g. process_key ch, self
 returns UNHANDLED if no block for it
 after form handles basic keys, it gives unhandled key to current field, if current field returns
 unhandled, then it checks this map.
 added 2009-01-06 19:13 since widgets need to handle keys properly
 added 2009-01-18 12:58 returns ret val of blk.call
 so that if block does not handle, the key can still be handled
 e.g. table last row, last col does not handle, so it will auto go to next field
  2010-02-24 13:45 handles 2 key combinations, copied from Form, must be identical in logic
  except maybe for window pointer. TODO not tested