Yeah it's not the only way. Windows actually provides and easy-to-use API to change screen brightness (since it's a standardised feature). I made a little physical knob that connects via USB to control mine since those capacitative buttons are a right pain.