    # File lib/rubygame/events.rb, line 37
      def self.enable_key_repeat( delay=:default, interval=:default )

        delay = if delay == :default
                  SDL::DEFAULT_REPEAT_DELAY
                else
                  delay.to_f
                end

        interval = if interval == :default
                     SDL::DEFAULT_REPEAT_INTERVAL
                   else
                     interval.to_f
                   end

        if delay < 0.001
          raise( ArgumentError,
                 "delay must be at least 0.001 sec (got #{delay})" )
        end

        if interval < 0.001
          raise( ArgumentError,
                 "interval must be at least 0.001 sec (got #{interval})" )
        end

        result = SDL.EnableKeyRepeat( (delay * 1000).to_i, (interval * 1000).to_i )

        if result != 0
          raise( Rubygame::SDLError,
                 "Could not enable key repeat: #{SDL.GetError()}" )
        end

        return nil
      end