def _process_key keycode, object, window
          return :UNHANDLED if @_key_map.nil?
          chr = nil
          ch = keycode
          if ch > 0 and ch < 256
            chr = ch.chr
          end
          blk = @_key_map[keycode]
          # i am scrappaing this since i am once again complicating too much
=begin
          # if blk then we found an exact match which supercedes any ranges, arrays and regexes
          unless blk
            @_key_map.each_pair do |k,p|
              $log.debug "KKK:  processing key #{ch}  #{chr} "
              if (k == ch || k == chr)
                $log.debug "KKK:  checking match == #{k}: #{ch}  #{chr} "
                # compare both int key and chr
                $log.debug "KKK:  found match 1 #{ch}  #{chr} "
                #p.call(self, ch)
                #return 0
                blk = p
                break
              elsif k.respond_to? :include?
                $log.debug "KKK:  checking match include #{k}: #{ch}  #{chr} "
                # this bombs if its a String and we check for include of a ch.
                if !k.is_a?( String ) && (k.include?( ch ) || k.include?(chr))
                  $log.debug "KKK:  found match include #{ch}  #{chr} "
                  #p.call(self, ch)
                  #return 0
                  blk = p
                  break
                end
              elsif k.is_a? Regexp
                if k.match(chr)
                  $log.debug "KKK:  found match regex #{ch}  #{chr} "
                  #p.call(self, ch)
                  #return 0
                  blk = p
                  break
                end
              end
            end
          end
=end
          # blk either has a proc or is nil
          # we still need to check for a complex map.  if none, then execute simple map.
          ret = check_composite_mapping(ch, window)
          $log.debug "  composite returned (#{ret}) for #{ch} "
          if !ret
            return execute_mapping(blk, ch, object) if blk
          end
          return execute_mapping(ret, ch, object) if ret
          return :UNHANDLED
        end
def _process_key keycode, object, window
          return :UNHANDLED if @_key_map.nil?
          chr = nil
          ch = keycode
          if ch > 0 and ch < 256
            chr = ch.chr
          end
          blk = @_key_map[keycode]
          # i am scrappaing this since i am once again complicating too much
=begin
          # if blk then we found an exact match which supercedes any ranges, arrays and regexes
          unless blk
            @_key_map.each_pair do |k,p|
              $log.debug "KKK:  processing key #{ch}  #{chr} "
              if (k == ch || k == chr)
                $log.debug "KKK:  checking match == #{k}: #{ch}  #{chr} "
                # compare both int key and chr
                $log.debug "KKK:  found match 1 #{ch}  #{chr} "
                #p.call(self, ch)
                #return 0
                blk = p
                break
              elsif k.respond_to? :include?
                $log.debug "KKK:  checking match include #{k}: #{ch}  #{chr} "
                # this bombs if its a String and we check for include of a ch.
                if !k.is_a?( String ) && (k.include?( ch ) || k.include?(chr))
                  $log.debug "KKK:  found match include #{ch}  #{chr} "
                  #p.call(self, ch)
                  #return 0
                  blk = p
                  break
                end
              elsif k.is_a? Regexp
                if k.match(chr)
                  $log.debug "KKK:  found match regex #{ch}  #{chr} "
                  #p.call(self, ch)
                  #return 0
                  blk = p
                  break
                end
              end
            end
          end
=end
          # blk either has a proc or is nil
          # we still need to check for a complex map.  if none, then execute simple map.
          ret = check_composite_mapping(ch, window)
          $log.debug "  composite returned (#{ret}) for #{ch} "
          if !ret
            return execute_mapping(blk, ch, object) if blk
          end
          return execute_mapping(ret, ch, object) if ret
          return :UNHANDLED
        end
This the new one which does not use orderedhash, it uses an array for multiple assignments
 and falls back to a single assignment if multiple fails.
 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.