Input range support

I'm almost embarrassed to call this a pull request, but it does solve #5892