def define_prefix_command _name, config={} #_mapvar=nil, _prompt=nil
          $rb_prefix_map ||= {}
          _name = _name.to_sym unless _name.is_a? Symbol
          $rb_prefix_map[_name] ||= {}
          scope = config[:scope] || self
          $rb_prefix_map[_name][:scope] = scope


          # create a variable by name _name
          # create a method by same name to use
          # Don;t let this happen more than once
          instance_eval %{
        def #{_name.to_s} *args
          #$log.debug "XXX:  came inside #{_name} "
           h = $rb_prefix_map["#{_name}".to_sym]
           raise "No prefix_map named #{_name}, #{$rb_prefix_map.keys} " unless h
           ch = @window.getchar
           if ch
            if ch == KEY_F1
              text =  ["Options are: "]
              h.keys.each { |e| c = keycode_tos(e); text << c + " " + @descriptions[e]  }
              textdialog text, :title => "#{_name} key bindings"
              return
            end
              res =  h[ch]
              if res.is_a? Proc
                res.call
              elsif res.is_a? Symbol
                 scope = h[:scope]
                 scope.send(res)
              elsif res.nil?
                Ncurses.beep
                 return :UNHANDLED
              end
           else
                 :UNHANDLED
           end
        end
          }
          return _name
        end
def define_prefix_command _name, config={} #_mapvar=nil, _prompt=nil
          $rb_prefix_map ||= {}
          _name = _name.to_sym unless _name.is_a? Symbol
          $rb_prefix_map[_name] ||= {}
          scope = config[:scope] || self
          $rb_prefix_map[_name][:scope] = scope


          # create a variable by name _name
          # create a method by same name to use
          # Don;t let this happen more than once
          instance_eval %{
        def #{_name.to_s} *args
          #$log.debug "XXX:  came inside #{_name} "
           h = $rb_prefix_map["#{_name}".to_sym]
           raise "No prefix_map named #{_name}, #{$rb_prefix_map.keys} " unless h
           ch = @window.getchar
           if ch
            if ch == KEY_F1
              text =  ["Options are: "]
              h.keys.each { |e| c = keycode_tos(e); text << c + " " + @descriptions[e]  }
              textdialog text, :title => "#{_name} key bindings"
              return
            end
              res =  h[ch]
              if res.is_a? Proc
                res.call
              elsif res.is_a? Symbol
                 scope = h[:scope]
                 scope.send(res)
              elsif res.nil?
                Ncurses.beep
                 return :UNHANDLED
              end
           else
                 :UNHANDLED
           end
        end
          }
          return _name
        end
define a key with sub-keys to which commands are attached.
 e.g. to attach commands to C-x a , C-x b, C-x x etc.

 == Example

 We create a map named :csmap and attach various commands to it
 on different keys. At this point, there is no main key that triggers it.
 Any key can be made the prefix command later. In this case, C-s was bound
 to the map. This is more organized that creating separate maps for
 C-s r, C-s s etc which then cannot be changed or customized by user.

    @form.define_prefix_command :csmap, :scope => self
    @form.define_key(:csmap, "r", 'refresh', :refresh )
    @form.define_key(:csmap, "s", 'specification') { specification }
    @form.bind_key ?\C-s, :csmap