Inverse shift+click sorting for custom queries

Add inverse sorting for custom queries
Keep the inverse order while shift+clicking after the first click