Button / hot key for selling half position

A simple button on the “trade mode” setting with the ability to sell half (long) or buy half (short) would be an extremely useful feature for me. Program the button / hot key to only work for position sizes that are of even numbers, ie: if you have 6 contracts long, when you hit the button/hot key it would reduce the position to 3 contracts.

Thank you much in advance