def remove_on_change(pattern=".*")
      pattern = (pattern.kind_of?(Regexp) ? pattern.source : pattern.to_s)
      if @listeners.has_key?(pattern)
        listener, proc = @listeners.delete(pattern)
        Klass.remove_OnKeyChange_Handler(listener.get_pointer(0))
        sleep @handler_sleep
        true
      else
        nil
      end
    end
def remove_on_change(pattern=".*")
      pattern = (pattern.kind_of?(Regexp) ? pattern.source : pattern.to_s)
      if @listeners.has_key?(pattern)
        listener, proc = @listeners.delete(pattern)
        Klass.remove_OnKeyChange_Handler(listener.get_pointer(0))
        sleep @handler_sleep
        true
      else
        nil
      end
    end
Removes a key listener
 @param [String] pattern pattern
 @return [Boolean] returns true or raises an error